Example usage for org.eclipse.jdt.core.dom MarkerAnnotation MarkerAnnotation

List of usage examples for org.eclipse.jdt.core.dom MarkerAnnotation MarkerAnnotation

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom MarkerAnnotation MarkerAnnotation.

Prototype

MarkerAnnotation(AST ast) 

Source Link

Document

Creates a new unparented marker annotation node owned by the given AST.

Usage

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public MarkerAnnotation convert(org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation annotation) {
    final MarkerAnnotation markerAnnotation = new MarkerAnnotation(this.ast);
    setTypeNameForAnnotation(annotation, markerAnnotation);
    int start = annotation.sourceStart;
    int end = annotation.declarationSourceEnd;
    markerAnnotation.setSourceRange(start, end - start + 1);
    if (this.resolveBindings) {
        recordNodes(markerAnnotation, annotation);
        markerAnnotation.resolveAnnotationBinding();
    }//from   w  ww  .  j a va 2 s.co m
    return markerAnnotation;
}