From 9804e683e655824ae64756293802dc16d8863948 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Fri, 8 Apr 2016 11:55:58 -0700 Subject: [PATCH] Cosmetics. Change-Id: I9cd2b475d2992086f4cf722c31c69d322377c484 --- .../editor/ExternalSearchAnnotationModel.java | 31 +++---------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchAnnotationModel.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchAnnotationModel.java index 1a4b3ead9c2..483cb54cb3d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchAnnotationModel.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchAnnotationModel.java @@ -22,36 +22,20 @@ import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel; import org.eclipse.cdt.core.model.ICModelMarker; public class ExternalSearchAnnotationModel extends ResourceMarkerAnnotationModel { - private final IPath fLocation; private final int fDepth; private final String fLocationAttribute; - /** - * @param markerResource - * @param location - */ public ExternalSearchAnnotationModel(IResource markerResource, IPath location) { this(markerResource, location, IResource.DEPTH_ZERO, ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION); } - /** - * @param markerResource - * @param location - * @param depth - */ ExternalSearchAnnotationModel(IResource markerResource, IPath location, int depth) { this(markerResource, location, depth, ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION); } - /** - * @param markerResource - * @param location - * @param depth - * @param locationAttribute - */ - ExternalSearchAnnotationModel(IResource markerResource, - IPath location, int depth, String locationAttribute) { + ExternalSearchAnnotationModel(IResource markerResource, IPath location, int depth, + String locationAttribute) { super(markerResource); fLocation= location; fDepth= depth; @@ -71,16 +55,11 @@ public class ExternalSearchAnnotationModel extends ResourceMarkerAnnotationModel protected boolean isAcceptable(IMarker marker) { boolean acceptable = false; String externalFileName = marker.getAttribute(fLocationAttribute, null); - if (externalFileName != null) { // Only accept markers with external - // paths set + if (externalFileName != null) { // Only accept markers with external paths set. IPath externalPath = new Path(externalFileName); - acceptable = externalPath.equals(fLocation); // Only accept - // markers for this - // annotation - // model's external - // editor + // Accept only markers for this annotation model's external editor. + acceptable = externalPath.equals(fLocation); } return acceptable; } - }