Examples of MarkerAnnotation


Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    List proposals = null;
    for (int i = 0; i < annotations.length; i++) {
      final Annotation annotation = annotations[i];
      ICompletionProposal proposal = null;
      if (annotation instanceof MarkerAnnotation) {
        MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;
        IMarker marker = mAnnot.getMarker();
        if (isFixable(marker)) {
          final String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
          proposal = new MarkerResolutionProposal(new RutaRequirePackageMarkerResolution(pkgName,
                  scriptProject), marker);
        }
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    return false;
  }

  public static boolean hasCorrections(Annotation annotation) {
    if (annotation instanceof MarkerAnnotation) {
      MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;
      IMarker marker = mAnnot.getMarker();
      return isFixable(marker);
    } else if (annotation instanceof IScriptAnnotation) {
      return isFixable((IScriptAnnotation) annotation);
    }
    return false;
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    List<String> hoverResult = new ArrayList<String>();
   
    for (Annotation ann : annotations) {
      if(ann instanceof MarkerAnnotation){
       
        MarkerAnnotation mAnn = (MarkerAnnotation) ann;
        IMarker m = mAnn.getMarker();
       
        try {
          String a = (String) m.getAttribute(IMarker.MESSAGE);
          hoverResult.add(a + "  ");         
        } catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    if (model != null) {
      Iterator<?> e = model.getAnnotationIterator();
      while (e.hasNext()) {
        Object o = e.next();
        if (o instanceof MarkerAnnotation) {
          MarkerAnnotation a = (MarkerAnnotation)o;
          if (compareRulerLine(model.getPosition(a),
              aViewer.getDocument(), aLine) != 0) {
            marker = a.getMarker();
          }
        }
      }
    }
    return marker;
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    List proposals = null;
    for (int i = 0; i < annotations.length; i++) {
      final Annotation annotation = annotations[i];
      ICompletionProposal proposal = null;
      if (annotation instanceof MarkerAnnotation) {
        MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;
        IMarker marker = mAnnot.getMarker();
        if (isFixable(marker)) {
          final String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
          proposal = new MarkerResolutionProposal(new RutaRequirePackageMarkerResolution(
                  pkgName, scriptProject), marker);
        }
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

    return false;
  }

  public static boolean hasCorrections(Annotation annotation) {
    if (annotation instanceof MarkerAnnotation) {
      MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;
      IMarker marker = mAnnot.getMarker();
      return isFixable(marker);
    } else if (annotation instanceof IScriptAnnotation) {
      return isFixable((IScriptAnnotation) annotation);
    }
    return false;
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

                    externalFileEditorInput, 0, false, model);

            Map<Annotation, Position> annotationsToAdd = new HashMap<Annotation, Position>();
            for (IMarker m : markers) {
                Position pos = AbstractBreakpointRulerAction.getMarkerPosition(doc, m, model);
                MarkerAnnotation newAnnotation = new MarkerAnnotation(m);
                annotationsToAdd.put(newAnnotation, pos);
            }

            //update all in a single step
            modelExtension.replaceAnnotations(existing.toArray(new Annotation[0]), annotationsToAdd);
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

                        }

                        while (annotationIterator.hasNext()) {
                            Object object = annotationIterator.next();
                            if (object instanceof MarkerAnnotation) {
                                MarkerAnnotation m = (MarkerAnnotation) object;
                                if (m.isMarkedDeleted()) {
                                    continue;
                                }
                                marker = new MarkerAnnotationAndPosition(m, annotationModel.getPosition(m));
                                return true;
                            }
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

        attrs.put(IMarker.CHAR_START, start);
        attrs.put(IMarker.CHAR_END, end);

        MarkerStub marker = new MarkerStub(attrs);
        return new MarkerAnnotationAndPosition(
                new MarkerAnnotation("org.eclipse.core.resources.problemmarker", marker), new Position(start, end
                        - start));
    }
View Full Code Here

Examples of org.eclipse.ui.texteditor.MarkerAnnotation

        while (iter.hasNext())
        {
            Object object = iter.next();
            if (object instanceof MarkerAnnotation)
            {
                MarkerAnnotation annotation = (MarkerAnnotation) object;
                if (compareRulerLine(model.getPosition(annotation), document, line))
                {
                    IMarker marker = annotation.getMarker();
                    String message = marker.getAttribute(IMarker.MESSAGE, (String) null);
                    if (message != null && message.trim().length() > 0)
                        messages.add(message);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.