Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.editor.text;
public class AntExternalAnnotationModel extends AnnotationModel implements IProblemRequestor {
    private List fGeneratedAnnotationsnew ArrayList();
	private List fCollectedProblemsnew ArrayList();
    /* (non-Javadoc)
	 * @see org.eclipse.ant.internal.ui.editor.outline.IProblemRequestor#acceptProblem(org.eclipse.ant.internal.ui.editor.outline.IProblem)
	 */
	public void acceptProblem(IProblem problem) {
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ant.internal.ui.editor.outline.IProblemRequestor#acceptProblem(org.eclipse.ant.internal.ui.editor.outline.IProblem)
	 */
	public void endReporting() {
		boolean temporaryProblemsChangedfalse;
		synchronized (getAnnotationMap()) {
			if (.size() > 0) {
				temporaryProblemsChangedtrue;	
			}
			if ( != null && .size() > 0) {
				while (e.hasNext()) {
					IProblem problem= (IProbleme.next();
					Position positioncreatePositionFromProblem(problem);
					if (position != null) {
						XMLProblemAnnotation annotationnew XMLProblemAnnotation(problem);
						try {
							addAnnotation(annotationpositionfalse);
catch (BadLocationException ex) {
							AntUIPlugin.log(ex);
						}
						temporaryProblemsChangedtrue;
					}
				}
			}
		}
		if (temporaryProblemsChanged)
	}
		int startproblem.getOffset();
		if (start >= 0) {
			int lengthproblem.getLength();
			if (length >= 0)
				return new Position(startlength);
		}
		return null;
	}
    /* (non-Javadoc)
     * @see org.eclipse.ant.internal.ui.model.IProblemRequestor#beginReporting()
     */
    public void beginReporting() {
    }
New to GrepCode? Check out our FAQ X