Marks a type as already defined.

@param type - the type to mark already defined.
@param fileName - a file where the type is already defined.
If fileName is null this information will not be part of the message.
175019
protected void addIssue(final JvmDeclaredType type, final String fileName) {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("The type ");
    String _simpleName = type.getSimpleName();
    _builder.append(_simpleName);
    _builder.append(" is already defined");
    {
      if ((fileName != null)) {
        _builder.append(" in ");
        _builder.append(fileName);
      }
    }
    _builder.append(".");
    final String message = _builder.toString();
    final EObject sourceElement = this.associations.getPrimarySourceElement(type);
    if ((sourceElement == null)) {
      this.addIssue(message, type, IssueCodes.DUPLICATE_TYPE);
    } else {
      final EStructuralFeature feature = sourceElement.eClass().getEStructuralFeature("name");
      this.addIssue(message, sourceElement, feature, IssueCodes.DUPLICATE_TYPE);
    }
  }
24724
public void saveFile(File file, String type)
   {
      if (file != null)
      {
         m_treeController.saveFile(file, type);
      }
   }
625224
public synchronized void setFilename(String filename)
    {
        if (filename!=null)
        {
            filename=filename.trim();
            if (filename.length()==0)
                filename=null;
        }
        
        if (isStarted() && _filename!=null && filename==null)
            _out=null;
        
        _reopen=isStarted() &&
            ((_filename==null && filename!=null)||
             (_filename!=null && !_filename.equals(filename)));
        _filename=filename;

        if (!isStarted() && _filename!=null)
            _out=null;
    }
515853
public void addFile(String filename, String filePath) {
        int pathIndex = filePathList.indexOf(filePath);
        if (pathIndex == -1) {
            fileNameList.add(filename);
            filePathList.add(filePath);
        }
    }
710266
public <T> ExcelDataWriter<?> registerDataWriter(Class<T> type, ExcelDataWriter<T> writer) {
        if (writer != null) {
            return writers.put(type, writer);
        } else {
            return null;
        }
    }
1264207
public void setMinorTickMarkType(final TickMarkType TYPE) {
        if (null == minorTickMarkType) {
            _minorTickMarkType = null == TYPE ? TickMarkType.LINE : TYPE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            minorTickMarkType.set(TYPE);
        }
    }
161519
public void setType(Type type) {
        Type actual = Type.preserveType(this.getType(), type);

        mConversions.clear();
        mExceptionPossible = false;
        if (actual != null) {
            // Prefer cast for initial type for correct operation of
            // setInitialType if a conversion needs to be inserted at the
            // beginning.
            mConversions.add(new Conversion(null, actual, true));
        }
    }
235357
public boolean isTypeGenerifiedBy(String type) {
        if (typeGenericName.length > 2 && typeGenericName[2].equals(type)) {
            return true;
        }
        if (typeGenericName.length > 1 && typeGenericName[1].equals(type)) {
            return true;
        }
        if (typeGenericName.length > 0 && typeGenericName[0].equals(type)) {
            return true;
        }
        return false;
    }
1080160
public void writeHeaders(ShapeType type) throws IOException {
		try {
			handler = type.getShapeHandler();
		} catch (ShapefileException se) {
			throw new IOException("Error with type " + type, se);
		}
        if(indexBuffer != null) {
            indexBuffer.flush();
        }
        if(shapeBuffer != null) {
            shapeBuffer.flush();
        }
        long fileLength = shpChannel.position();
        shpChannel.position(0);
        shxChannel.position(0);
		ShapefileHeader header = new ShapefileHeader();
        Envelope writeBounds = bounds;
        if(writeBounds == null) {
            writeBounds = new Envelope();
        }
        indexBuffer = new WriteBufferManager(shxChannel);
        shapeBuffer = new WriteBufferManager(shpChannel);
		header.write(shapeBuffer, type, cnt, (int)(fileLength / 2),
                writeBounds.getMinX(), writeBounds.getMinY(), writeBounds.getMaxX(), writeBounds
						.getMaxY());
		header.write(indexBuffer, type, cnt,
                50 + 4 * cnt, writeBounds.getMinX(),
                writeBounds.getMinY(), writeBounds.getMaxX(), writeBounds.getMaxY());
		offset = 50;
		this.type = type;
	}
980610
public void saveFile(File file, String type)
   {
      try
      {
         Class<? extends ProjectWriter> fileClass = WRITER_MAP.get(type);
         if (fileClass == null)
         {
            throw new IllegalArgumentException("Cannot write files of type: " + type);
         }

         ProjectWriter writer = fileClass.newInstance();
         writer.write(m_projectFile, file);
      }

      catch (Exception ex)
      {
         throw new RuntimeException(ex);
      }
   }
727362
public void setType(String type) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(type)) {
            m_type = Type.parse(type.trim());
        }
    }
214401
public void beginType(String type, String kind, int modifiers) throws IOException {
    beginType(type, kind, modifiers, null);
  }
222793
private void setType(Type type) {
    setSamplesPerSecond(type.getSamplesPerSecond());
    setFramesPerSecond(type.getFramesPerSecond());
    setUseSamples(type.usesSamples());
  }
907232
public final void setType(final NotifyType type) {
        setType((type != null) ? type.getCssName() : NotifyType.INFO.getCssName());
    }
85565
private void type(String type) throws IOException {
    if (this.packagePrefix == null) {
      throw new IllegalStateException();
    }

    Matcher m = TYPE_PATTERN.matcher(type);
    int pos = 0;
    while (true) {
      boolean found = m.find(pos);

      // copy non-matching characters like "<"
      int typeStart = found ? m.start() : type.length();
      out.write(type, pos, typeStart - pos);

      if (!found) {
        break;
      }

      // copy a single class name, shortening it if possible
      String name = m.group(0);
      String imported;
      if ((imported = importedTypes.get(name)) != null) {
        out.write(imported);
      } else if (name.startsWith(packagePrefix)
          && name.indexOf('.', packagePrefix.length()) == -1) {
        out.write(name.substring(packagePrefix.length()));
      } else if (name.startsWith("java.lang.")) {
        out.write(name.substring("java.lang.".length()));
      } else {
        out.write(name);
      }
      pos = m.end();
    }
  }
1180360
private void setTypeString(final String type) {
        if (type == null) {
            this.type = null;
        } else if (type.equalsIgnoreCase("WARN")) {
            this.type = Type.WARN;
        } else if (type.equalsIgnoreCase("ERROR")) {
            this.type = Type.ERROR;
        } else if (type.equalsIgnoreCase("DEBUG")) {
            this.type = Type.DEBUG;
        } else if (type.equalsIgnoreCase("INFO")) {
            this.type = Type.INFO;
        }
    }
1030582
public void register(Type<?> type) {
        jdbcTypeMapping.register(type.getSQLTypes()[0], type.getReturnedClass());
        javaTypeMapping.register(type);
    }