org.eclipse.ui.texteditor.AnnotationPreference#getPresentationLayer ( )源码实例Demo

下面列出了org.eclipse.ui.texteditor.AnnotationPreference#getPresentationLayer ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: xtext-eclipse   文件: XtextAnnotation.java
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;
}
 
源代码2 项目: APICloud-Studio   文件: ProblemAnnotation.java
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;
}