下面列出了org.eclipse.ui.texteditor.AnnotationPreference#getPresentationLayer ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public XtextAnnotation(String type, boolean isPersistent, IXtextDocument document, Issue issue, boolean isQuickfixable) {
super(type, isPersistent, issue.getMessage());
AnnotationPreference preference= lookup.getAnnotationPreference(this);
if (preference != null)
this.layer = preference.getPresentationLayer() + 1;
else
this.layer = IAnnotationAccessExtension.DEFAULT_LAYER + 1;
this.document = document;
this.issue = issue;
this.isQuickfixable = isQuickfixable;
}
private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup)
{
Annotation annotation = new Annotation(annotationType, false, null);
AnnotationPreference preference = lookup.getAnnotationPreference(annotation);
if (preference != null)
{
return preference.getPresentationLayer() + 1;
}
else
{
return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
}
}
private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
Annotation annotation= new Annotation(annotationType, false, null);
AnnotationPreference preference= lookup.getAnnotationPreference(annotation);
if (preference != null)
return preference.getPresentationLayer() + 1;
else
return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
}