Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IResource.createMarker()


                //                at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
                //                at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
                //                at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
                //                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
                if (resource != null) {
                    IMarker marker = resource.createMarker(BndtoolsConstants.MARKER_BND_PROBLEM);
                    marker.setAttribute(IMarker.SEVERITY, severity);
                    marker.setAttribute("$bndType", type);
                    marker.setAttribute(BuildErrorDetailsHandler.PROP_HAS_RESOLUTIONS, markerData.hasResolutions());
                    for (Entry<String,Object> attrib : markerData.getAttribs().entrySet())
                        marker.setAttribute(attrib.getKey(), attrib.getValue());
View Full Code Here


    }

    private void addClasspathMarker(String message, int severity) throws CoreException {
        IResource resource = DefaultBuildErrorDetailsHandler.getDefaultResource(getProject());

        IMarker marker = resource.createMarker(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM);
        marker.setAttribute(IMarker.SEVERITY, severity);
        marker.setAttribute(IMarker.MESSAGE, message);
    }

    private int iStatusSeverityToIMarkerSeverity(IStatus status) {
View Full Code Here

        if (resource == null || !resource.exists())
            resource = project;

        project.deleteMarkers(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM, true, IResource.DEPTH_INFINITE);
        for (String error : errors) {
            IMarker marker = resource.createMarker(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM);
            marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
            marker.setAttribute(IMarker.MESSAGE, error);
        }
    }
View Full Code Here

    }

    private void addClasspathMarker(String message, int severity) throws CoreException {
        IResource resource = DefaultBuildErrorDetailsHandler.getDefaultResource(getProject());

        IMarker marker = resource.createMarker(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM);
        marker.setAttribute(IMarker.SEVERITY, severity);
        marker.setAttribute(IMarker.MESSAGE, message);
    }

    private void addClasspathMarker(IStatus status) throws CoreException {
View Full Code Here

        if (resource == null || !resource.exists())
            resource = project;

        project.deleteMarkers(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM, true, IResource.DEPTH_INFINITE);
        for (String error : errors) {
            IMarker marker = resource.createMarker(BndtoolsConstants.MARKER_BND_CLASSPATH_PROBLEM);
            marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
            marker.setAttribute(IMarker.MESSAGE, error);
        }
    }
View Full Code Here

        IResource resource = module.getCorrespondingResource();
        if (resource == null) {
            resource = ResourcesPlugin.getWorkspace().getRoot();
            setPath = true;
        }
        final IMarker marker = resource.createMarker(type);
        marker.setAttribute(IMarker.CHAR_START, offset);
        marker.setAttribute(IMarker.CHAR_END, offset + length);
        if (setPath) {
            marker.setAttribute(PATH_ATTRIBUTE, module.getFilePath());
        }
View Full Code Here

            if (file != null) {
                resource = file;
            } else {
                resource = ResourcesPlugin.getWorkspace().getRoot();
            }
            final IMarker marker = resource.createMarker(markerKind);
            marker.setAttribute(IMarker.MESSAGE, message);
            marker.setAttribute(IMarker.SEVERITY, severity);
            marker.setAttribute(IMarker.LINE_NUMBER, lineNumber >= 0 ? lineNumber : 1);
            String myPath = path;
            if (path == null) {
View Full Code Here

      sevMarker = IMarker.SEVERITY_INFO;

    // Create the marker
    // TODO: create markers according to the type of the analysis
    try {
      IMarker marker = resource.createMarker(Crystal.MARKER_DEFAULT);
      marker.setAttribute(IMarker.CHAR_START, node.getStartPosition());
      marker.setAttribute(IMarker.CHAR_END, node.getStartPosition() + node.getLength());
      marker.setAttribute(IMarker.MESSAGE, prefix + ": " + problemDescription);
      marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL);
      marker.setAttribute(IMarker.SEVERITY, sevMarker);
View Full Code Here

      sevMarker = IMarker.SEVERITY_INFO;

    // Create the marker
    // TODO: create markers according to the type of the analysis
    try {
      IMarker marker = resource.createMarker(Crystal.MARKER_DEFAULT);
      marker.setAttribute(IMarker.CHAR_START, node.getStartPosition());
      marker.setAttribute(IMarker.CHAR_END, node.getStartPosition() + node.getLength());
      marker.setAttribute(IMarker.MESSAGE, "[" + analysisName + "]: " + problemDescription);
      marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL);
      marker.setAttribute(IMarker.SEVERITY, sevMarker);
View Full Code Here

      String filePath = buildError.getFilePath().toString();
      IResource resource = getProject().findMember(filePath);
      if(resource == null)
        continue;
     
      IMarker dubMarker = resource.createMarker(getBuildProblemId());
     
      dubMarker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
      dubMarker.setAttribute(IMarker.MESSAGE, buildError.getErrorMessage());
     
      int line = buildError.getFileLineNumber();
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.