Examples of IMarker


Examples of org.eclipse.core.resources.IMarker

        while (iter.hasNext()) {
            Annotation annotation = (Annotation) iter.next();
            if (annotation instanceof MarkerAnnotation && canFix(annotation)) {
                Position position = model.getPosition(annotation);
                if (isAtPosition(context.getOffset(), position)) {
                    IMarker marker = ((MarkerAnnotation) annotation).getMarker();
                    String errorType = marker.getAttribute("$bndType", null);
                    if (errorType != null) {
                        BuildErrorDetailsHandler handler = BuildErrorDetailsHandlers.INSTANCE.findHandler(errorType);
                        if (handler != null) {
                            proposals.addAll(handler.getProposals(marker));
                        }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

            Iterator iterator = annotationModel.getAnnotationIterator();
            while (iterator.hasNext()) {
                Object object = iterator.next();
                if (object instanceof SimpleMarkerAnnotation) {
                    SimpleMarkerAnnotation markerAnnotation = (SimpleMarkerAnnotation) object;
                    IMarker marker = markerAnnotation.getMarker();
                    try {
                        if (marker.isSubtypeOf(IBreakpoint.BREAKPOINT_MARKER)) {
                            Position position = annotationModel.getPosition(markerAnnotation);
                            int line = document.getLineOfOffset(position.getOffset());
                            if (line == fRulerInfo.getLineOfLastMouseButtonActivity()) {
                                IBreakpoint breakpoint = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(marker);
                                if (breakpoint != null) {
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

   
    List markers = MarkerUtil.getMarkersForLine(resource, line+1);
    if (markers != null) {
      info = "";
      for (int i =  0; i < markers.size(); i++) {
        IMarker marker = (IMarker) markers.get(i);
        String message =
          marker.getAttribute(IMarker.MESSAGE, (String) null);
        if (message != null && message.trim().length() > 0) {
         
          if (message.length() > MAX_INFO_LENGTH) {
            message = splitMessage(message);
          }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

      while (e.hasNext()) {
        Object o = e.next();
        if (o instanceof MarkerAnnotation) {
          MarkerAnnotation a = (MarkerAnnotation) o;
          try {
            IMarker marker = a.getMarker();
            int markerLineNumber = ((Integer) marker.getAttribute(IMarker.LINE_NUMBER)).intValue();
            if (marker.getType().equals(Constants.PROBLEM_MARKER) && markerLineNumber == aLine) {
              markers.add(marker);
              //System.out.println("Marker: " + marker.getAttribute(IMarker.MESSAGE));
            }
          } catch (CoreException e1) {
            e1.printStackTrace();
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

        IBreakpoint[] breakpoints = manager.getBreakpoints(modelId);

        for (int i = 0; i < breakpoints.length; i++)
        {
            PerlLineBreakpoint breakpoint = (PerlLineBreakpoint) breakpoints[i];
            IMarker marker = breakpoint.getMarker();
            if (isValidMarker(marker))
            {
                // XXX: refactor this into methods
                if (breakpoint.getLineNumber() == lineNumber && resource.equals(marker.getResource()))
                {
                    return breakpoint;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

            if (view != null) closeView(view);
           
            IVerticalRuler ruler = testIface.getVerticalRuler();
            IAnnotationModel model = ruler.getModel();
           
            IMarker marker = getErrorMarker(model);
            assertNotNull(marker);

            editor.addRulerContextMenuListener(new PopupActionRunner(ACTION_ID));
           
            Mouse.click(getMarkerLocation(editor, marker), true);
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

  }

  public static String getMarkerMessages(IMarker[] markers) throws CoreException {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < markers.length; i++) {
      IMarker currMarker = markers[i];
      String message = (String) currMarker.getAttribute("message");
      if (i > 0) {
        sb.append(", ");
      }
      sb.append(message);
    }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

    }

    private static void markMissingImport(IPackageImport pkgImport, IProject project)
        throws CoreException
    {
        IMarker marker = project.getProject().createMarker(
            SigilCore.MARKER_UNRESOLVED_IMPORT_PACKAGE);
        marker.setAttribute("element", pkgImport.getPackageName());
        marker.setAttribute("versionRange", pkgImport.getVersions().toString());
        marker.setAttribute(IMarker.MESSAGE, "Cannot resolve imported package \""
            + pkgImport.getPackageName() + "\" with version range "
            + pkgImport.getVersions());
        marker.setAttribute(IMarker.SEVERITY,
            pkgImport.isOptional() ? IMarker.SEVERITY_WARNING : IMarker.SEVERITY_ERROR);
        marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
    }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

    }

    private static void markMissingRequiredBundle(IRequiredBundle req, IProject project)
        throws CoreException
    {
        IMarker marker = project.getProject().createMarker(
            SigilCore.MARKER_UNRESOLVED_REQUIRE_BUNDLE);
        marker.setAttribute("element", req.getSymbolicName());
        marker.setAttribute("versionRange", req.getVersions().toString());
        marker.setAttribute(IMarker.MESSAGE, "Cannot resolve required bundle \""
            + req.getSymbolicName() + "\" with version range " + req.getVersions());
        marker.setAttribute(IMarker.SEVERITY, req.isOptional() ? IMarker.SEVERITY_WARNING
            : IMarker.SEVERITY_ERROR);
        marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
    }
View Full Code Here

Examples of org.eclipse.core.resources.IMarker

    protected void setMarker(String type, String message, int priority, int severity)
        throws CoreException
    {
        IFileEditorInput file = (IFileEditorInput) getPage().getEditor().getEditorInput();
        IMarker marker = file.getFile().createMarker(type);
        marker.setAttribute(IMarker.MESSAGE, message);
        marker.setAttribute(IMarker.PRIORITY, priority);
        marker.setAttribute(IMarker.SEVERITY, severity);
    }
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.