protected void initializeBuidlerID(BuilderBase builder) {
   if (builder != null) {
     BUILDER_ID = builder.getBuilderID();
   } else {
     BUILDER_ID = parseController.getLanguage().getName() + ".builder";
   }
 }
 public void addMarker(int severity, String message, int lineNumber, int charStart, int charEnd)
     throws ProblemLimit.LimitExceededException {
   String adjustedMessage = message;
   if (problemLimit != null) {
     adjustedMessage = problemLimit.check(severity, message);
     if (adjustedMessage == null) return;
   }
   Map<String, Object> attributes = new HashMap<String, Object>();
   attributes.put(IMarker.MESSAGE, adjustedMessage);
   attributes.put(IMarker.SEVERITY, Integer.valueOf(severity));
   if (lineNumber == -1) {
     lineNumber = 1;
   }
   Integer lineKey = Integer.valueOf(lineNumber);
   attributes.put(IMarker.LINE_NUMBER, lineKey);
   if (charStart <= charEnd) {
     attributes.put(IMarker.CHAR_START, Integer.valueOf(charStart));
     attributes.put(IMarker.CHAR_END, Integer.valueOf(charEnd));
   }
   //      attributes.put(BUILDER_ID, creationFactory.getBuilderId());
   if (builder != null) attributes.put(BUILDER_ID, builder.getBuilderID());
   if (entries == null) entries = new HashMap<Integer, List<Map<String, Object>>>();
   List<Map<String, Object>> lineEntries = entries.get(lineKey);
   if (lineEntries == null) {
     lineEntries = new ArrayList<Map<String, Object>>();
     entries.put(lineKey, lineEntries);
   }
   lineEntries.add(attributes);
   if (adjustedMessage != message) throw new ProblemLimit.LimitExceededException(adjustedMessage);
 }
 protected void initializeProblemMarkerID(BuilderBase builder) {
   if (builder != null) {
     PROBLEM_MARKER_ID = builder.getErrorMarkerID();
   } else {
     PROBLEM_MARKER_ID = parseController.getLanguage().getName() + ".builder";
   }
 }
  /**
   * Constructor to use when you want to create markers that are related to a particular builder and
   * that will have a marker type and builder id based on that builder.
   *
   * @param file The file on which markers are to be placed
   * @param parseController The source of the parse stream to which error messages will be related
   * @param builder The builder that is presumably driving the creation of markers and that defines
   *     the type of marker and builder id that will be used here
   */
  public MarkerCreatorWithBatching(
      IFile file, IParseController parseController, BuilderBase builder) {
    super(file, parseController, builder.getErrorMarkerID());

    this.builder = builder;
    initializeBuidlerID(builder);
    initializeProblemMarkerID(builder);
  }