Package org.eclipse.core.resources

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


    if (model == null)
      return false;

    final IMarker[] allMarkers;
    try {
      allMarkers= resource.findMarkers(null, true, IResource.DEPTH_ZERO);
    } catch (CoreException x) {
      handleCoreException(x, TextEditorMessages.SelectMarkerRulerAction_getMarker);
      return false;
    }
View Full Code Here


            throws CoreException {
        int result = 0;
        IResource resource = context.getPolicyResource();

        if (resource.exists()) {
            currentProblemMarkers = resource.findMarkers(IMarker.PROBLEM, true,
                    IResource.DEPTH_INFINITE);
            int notSeverity = ~severity;
            for (int i = 0; i < currentProblemMarkers.length; i++) {
                if (currentProblemMarkers[i].getAttribute(IMarker.SEVERITY,
                        notSeverity)
View Full Code Here

     * @throws CoreException If there is a problem accessing markers.
     */
    private int countTaskMarkers() throws CoreException {
        IResource resource = context.getPolicyResource();
        if (resource.exists()) {
            currentTaskMarkers = resource.findMarkers(IMarker.TASK, true,
                    IResource.DEPTH_INFINITE);
        }
        return currentTaskMarkers.length;
    }

View Full Code Here

    IDocument document = getDocument();
    AbstractMarkerAnnotationModel annotationModel = getAnnotationModel();

    if (resource != null && annotationModel != null && resource.exists()) {
      try {
        IMarker[] allMarkers = resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
        if (allMarkers != null) {
          for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(annotationModel.getMarkerPosition(allMarkers[i]), document)) {
              markers.add(allMarkers[i]);
            }
View Full Code Here

    IDocument document = getDocument();
    AbstractMarkerAnnotationModel model = getAnnotationModel();

    if (resource != null && model != null && resource.exists()) {
      try {
        IMarker[] allMarkers = resource.findMarkers(IBreakpoint.LINE_BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
        if (allMarkers != null) {
          for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) {
              return true;
            }
View Full Code Here

    IDocument document = getDocument();
    AbstractMarkerAnnotationModel annotationModel = getAnnotationModel();

    if (resource != null && annotationModel != null && resource.exists()) {
      try {
        IMarker[] allMarkers = resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
        if (allMarkers != null) {
          for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(annotationModel.getMarkerPosition(allMarkers[i]), document)) {
              markers.add(allMarkers[i]);
            }
View Full Code Here

    IDocument document = getDocument();
    AbstractMarkerAnnotationModel model = getAnnotationModel();

    if (resource != null && model != null && resource.exists()) {
      try {
        IMarker[] allMarkers = resource.findMarkers(IBreakpoint.LINE_BREAKPOINT_MARKER, true, IResource.DEPTH_ZERO);
        if (allMarkers != null) {
          for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) {
              return true;
            }
View Full Code Here

      Mapping atgmap = readMapping(resource);
      if (atgmap == null) {
        return; // missing or invalid mapping
      }

      IMarker[] javamarkers = resource.findMarkers(
          IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ZERO);

      if (javamarkers.length > 0) {
        IMarker[] atgmarkers = filterMarkers(javamarkers, atgmap, 0);
        atgmarkers = createMarkers(atgmarkers, atgFile);
View Full Code Here

        mp.markerSeverity = MarkerSeverity.get(markerSeverityStr).value;
    }

    private void addMarker(MarkerParameter mp) throws CoreException {
        IResource markerTarget = mp.resource.getMarkerTarget();
        IMarker[] existingMarkers = markerTarget.findMarkers(mp.markerType, true, IResource.DEPTH_ZERO);
        Map<String, Object> attributes = createMarkerAttributes(mp);

        // XXX Workaround for bug 2785257 (has to be solved better)
        // see
        // http://sourceforge.net/tracker/?func=detail&atid=614693&aid=2785257&group_id=96405
View Full Code Here

  {
    // run cdt checkers for non syntactic problems.
    IResource resource = src.getResource();
    CodanRunner.processResource(
        resource, CheckerLaunchMode.RUN_ON_DEMAND, new NullProgressMonitor());
    return resource.findMarkers(null, true, IResource.DEPTH_ZERO);
  }
}
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.