Java Code Examples for org.eclipse.jface.text.source.IAnnotationAccessExtension#DEFAULT_LAYER
The following examples show how to use
org.eclipse.jface.text.source.IAnnotationAccessExtension#DEFAULT_LAYER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SourceCodeTextEditor.java From xds-ide with Eclipse Public License 1.0 | 6 votes |
@Override public int getLayer(Annotation annotation) { if (annotation instanceof MarkerAnnotation) { MarkerAnnotation markerAnnotation = (MarkerAnnotation)annotation; IMarker im = markerAnnotation.getMarker(); try { if (XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE.equals(im.getType()) && im.getAttribute(XdsMarkerConstants.MARKER_GRAY_STATE, false)) { markerAnnotation.markDeleted(true); return IAnnotationAccessExtension.DEFAULT_LAYER; // place gray markers under all other } } catch (Exception e) { // hz } } return super.getLayer(annotation); }
Example 2
Source File: XtextAnnotation.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
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; }
Example 3
Source File: XtextEditor.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected IAnnotationAccess createAnnotationAccess() { return new DefaultMarkerAnnotationAccess() { @Override public int getLayer(Annotation annotation) { if (annotation.isMarkedDeleted()) { return IAnnotationAccessExtension.DEFAULT_LAYER; } return super.getLayer(annotation); } }; }
Example 4
Source File: ProblemAnnotation.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
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; } }
Example 5
Source File: CompilationUnitDocumentProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
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; }
Example 6
Source File: AnnotationExpandHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected int getOrder(Annotation annotation) { if (fAnnotationAccess instanceof IAnnotationAccessExtension) { IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess; return extension.getLayer(annotation); } return IAnnotationAccessExtension.DEFAULT_LAYER; }