本文整理汇总了Java中org.eclipse.jface.text.source.IAnnotationAccessExtension.getLayer方法的典型用法代码示例。如果您正苦于以下问题:Java IAnnotationAccessExtension.getLayer方法的具体用法?Java IAnnotationAccessExtension.getLayer怎么用?Java IAnnotationAccessExtension.getLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.source.IAnnotationAccessExtension
的用法示例。
在下文中一共展示了IAnnotationAccessExtension.getLayer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOrder
import org.eclipse.jface.text.source.IAnnotationAccessExtension; //导入方法依赖的package包/类
protected int getOrder(Annotation annotation) {
if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
return extension.getLayer(annotation);
}
return IAnnotationAccessExtension.DEFAULT_LAYER;
}
示例2: findJavaAnnotation
import org.eclipse.jface.text.source.IAnnotationAccessExtension; //导入方法依赖的package包/类
private void findJavaAnnotation() {
fPosition= null;
fAnnotation= null;
fHasCorrection= false;
AbstractMarkerAnnotationModel model= getAnnotationModel();
IAnnotationAccessExtension annotationAccess= getAnnotationAccessExtension();
IDocument document= getDocument();
if (model == null)
return ;
boolean hasAssistLightbulb= fStore.getBoolean(PreferenceConstants.EDITOR_QUICKASSIST_LIGHTBULB);
Iterator<Annotation> iter= model.getAnnotationIterator();
int layer= Integer.MIN_VALUE;
while (iter.hasNext()) {
Annotation annotation= iter.next();
if (annotation.isMarkedDeleted())
continue;
int annotationLayer= layer;
if (annotationAccess != null) {
annotationLayer= annotationAccess.getLayer(annotation);
if (annotationLayer < layer)
continue;
}
Position position= model.getPosition(annotation);
if (!includesRulerLine(position, document))
continue;
AnnotationPreference preference= fAnnotationPreferenceLookup.getAnnotationPreference(annotation);
if (preference == null)
continue;
String key= preference.getVerticalRulerPreferenceKey();
if (key == null)
continue;
if (!fStore.getBoolean(key))
continue;
boolean isReadOnly= fTextEditor instanceof ITextEditorExtension && ((ITextEditorExtension)fTextEditor).isEditorInputReadOnly();
if (!isReadOnly
&& (
((hasAssistLightbulb && annotation instanceof AssistAnnotation)
|| JavaCorrectionProcessor.hasCorrections(annotation)))) {
fPosition= position;
fAnnotation= annotation;
fHasCorrection= true;
layer= annotationLayer;
continue;
} else if (!fHasCorrection) {
fPosition= position;
fAnnotation= annotation;
layer= annotationLayer;
}
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:62,代码来源:JavaSelectAnnotationRulerAction.java
示例3: findJavaAnnotation
import org.eclipse.jface.text.source.IAnnotationAccessExtension; //导入方法依赖的package包/类
private void findJavaAnnotation() {
fPosition= null;
fAnnotation= null;
fHasCorrection= false;
AbstractMarkerAnnotationModel model= getAnnotationModel();
IAnnotationAccessExtension annotationAccess= getAnnotationAccessExtension();
IDocument document= getDocument();
if (model == null)
return ;
boolean hasAssistLightbulb= fStore.getBoolean(PreferenceConstants.EDITOR_QUICKASSIST_LIGHTBULB);
Iterator<Annotation> iter= model.getAnnotationIterator();
int layer= Integer.MIN_VALUE;
while (iter.hasNext()) {
Annotation annotation= iter.next();
if (annotation.isMarkedDeleted())
continue;
int annotationLayer= layer;
if (annotationAccess != null) {
annotationLayer= annotationAccess.getLayer(annotation);
if (annotationLayer < layer)
continue;
}
Position position= model.getPosition(annotation);
if (!includesRulerLine(position, document))
continue;
boolean isReadOnly= fTextEditor instanceof ITextEditorExtension && ((ITextEditorExtension)fTextEditor).isEditorInputReadOnly();
if (!isReadOnly
&& (
((hasAssistLightbulb && annotation instanceof AssistAnnotation)
|| JavaCorrectionProcessor.hasCorrections(annotation)))) {
fPosition= position;
fAnnotation= annotation;
fHasCorrection= true;
layer= annotationLayer;
continue;
} else if (!fHasCorrection) {
AnnotationPreference preference= fAnnotationPreferenceLookup.getAnnotationPreference(annotation);
if (preference == null)
continue;
String key= preference.getVerticalRulerPreferenceKey();
if (key == null)
continue;
if (fStore.getBoolean(key)) {
fPosition= position;
fAnnotation= annotation;
layer= annotationLayer;
}
}
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:61,代码来源:JavaSelectAnnotationRulerAction.java