Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.IAnnotationAccessExtension


  private void checkReadOnly() {
    fPosition = null;
    fIsEditable = false;

    AbstractMarkerAnnotationModel model = getAnnotationModel();
    IAnnotationAccessExtension annotationAccess = getAnnotationAccessExtension();

    IDocument document = getDocument();
    if (model == null)
      return;

    Iterator iter = model.getAnnotationIterator();
    int layer = Integer.MIN_VALUE;

    while (iter.hasNext()) {
      Annotation annotation = (Annotation) iter.next();
      if (annotation.isMarkedDeleted())
        continue;

      int annotationLayer = annotationAccess.getLayer(annotation);
      if (annotationAccess != null)
        if (annotationLayer < layer)
          continue;

      Position position = model.getPosition(annotation);
View Full Code Here


   * @return the chosen marker or <code>null</code> if none of the given markers has a marker annotation in the model
   */
  protected IMarker chooseMarker(List markers) {

    AbstractMarkerAnnotationModel model= getAnnotationModel();
    IAnnotationAccessExtension access= getAnnotationAccessExtension();

    IMarker marker= null;
    int maxLayer= 0;

    Iterator iter= markers.iterator();
    while (iter.hasNext()) {
      IMarker m= (IMarker) iter.next();
      Annotation a= model.getMarkerAnnotation(m);
      if (a != null) {
        if (access == null) {
          marker= m;
          break;
        }
        int l= access.getLayer(a);
        if (l == maxLayer) {
          if (marker == null)
            marker= m;
        } else if (l > maxLayer) {
          maxLayer= l;
View Full Code Here

    fPosition = null;
    fAnnotation = null;
    fHasCorrection = false;

    AbstractMarkerAnnotationModel model = getAnnotationModel();
    IAnnotationAccessExtension annotationAccess = getAnnotationAccessExtension();

    IDocument document = getDocument();
    if (model == null)
      return;

    boolean hasAssistLightbulb = false;
    // fStore.getBoolean(RutaPreferenceConstants.EDITOR_QUICKASSIST_LIGHTBULB);

    Iterator iter = model.getAnnotationIterator();
    int layer = Integer.MIN_VALUE;

    while (iter.hasNext()) {
      Annotation 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);
View Full Code Here

  }

  private AnnotationBag findBagForType(Map bagMap, String annotationType) {
    AnnotationBag bag= (AnnotationBag) bagMap.get(annotationType);
    if (bag == null && fAnnotationAccess instanceof IAnnotationAccessExtension) {
      IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
      Object[] superTypes= extension.getSupertypes(annotationType);
      for (int i= 0; i < superTypes.length && bag == null; i++) {
        bag= (AnnotationBag) bagMap.get(superTypes[i]);
      }
    }
    return bag;
View Full Code Here

    fPosition = null;
    fAnnotation = null;
    fHasCorrection = false;

    AbstractMarkerAnnotationModel model = getAnnotationModel();
    IAnnotationAccessExtension annotationAccess = getAnnotationAccessExtension();

    IDocument document = getDocument();
    if (model == null)
      return;

    boolean hasAssistLightbulb = false;
    // fStore.getBoolean(RutaPreferenceConstants.EDITOR_QUICKASSIST_LIGHTBULB);

    Iterator iter = model.getAnnotationIterator();
    int layer = Integer.MIN_VALUE;

    while (iter.hasNext()) {
      Annotation 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);
View Full Code Here

     *         otherwise
     * @since 3.0
     */
    private boolean isCovered(Object annotationType, Set configured) {
        if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
            IAnnotationAccessExtension extension = (IAnnotationAccessExtension) fAnnotationAccess;
            Iterator e = configured.iterator();
            while (e.hasNext()) {
                if (extension.isSubtype(annotationType, e.next()))
                    return true;
            }
            return false;
        }
        return configured.contains(annotationType);
View Full Code Here

        Color color = (Color) fAnnotationTypes2Colors.get(annotationType);
        if (color != null)
            return color;

        if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
            IAnnotationAccessExtension extension = (IAnnotationAccessExtension) fAnnotationAccess;
            Object[] superTypes = extension.getSupertypes(annotationType);
            if (superTypes != null) {
                for (int i = 0; i < superTypes.length; i++) {
                    color = (Color) fAnnotationTypes2Colors.get(superTypes[i]);
                    if (color != null)
                        return color;
View Full Code Here

            fNext = null;
        }

        private boolean isSubtype(Object annotationType) {
            if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
                IAnnotationAccessExtension extension = (IAnnotationAccessExtension) fAnnotationAccess;
                return extension.isSubtype(annotationType, fType);
            }
            return fType.equals(annotationType);
        }
View Full Code Here

  }

  private AnnotationBag findBagForType(Map bagMap, String annotationType) {
    AnnotationBag bag= (AnnotationBag) bagMap.get(annotationType);
    if (bag == null && fAnnotationAccess instanceof IAnnotationAccessExtension) {
      IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
      Object[] superTypes= extension.getSupertypes(annotationType);
      for (int i= 0; i < superTypes.length && bag == null; i++) {
        bag= (AnnotationBag) bagMap.get(superTypes[i]);
      }
    }
    return bag;
View Full Code Here

    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 iter = model.getAnnotationIterator();
    int layer = Integer.MIN_VALUE;

    while (iter.hasNext()) {
      Annotation 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);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.IAnnotationAccessExtension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.