From 7b619824e86442c54c3843a08e9239eea06b561b Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 20 Jan 2013 21:33:55 -0800 Subject: [PATCH] Cosmetics. --- .../ui/viewsupport/ProblemsLabelDecorator.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java index 9e9bb99d4e3..3785db6d355 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java @@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; /** * LabelDecorator that decorates an element's image with error and warning overlays that * represent the severity of markers attached to the element's underlying resource. To see - * a problem decoration for a marker, the marker needs to be a subtype of IMarker.PROBLEM. + * a problem decoration for a marker, the marker needs to be a subtype of {@code IMarker.PROBLEM}. *

* Note: Only images for elements in Java projects are currently updated on marker changes. *

@@ -49,23 +49,22 @@ import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry; * @since 2.0 */ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabelDecorator { - /** - * This is a special LabelProviderChangedEvent carring additional - * information whether the event orgins from a maker change. + * This is a special LabelProviderChangedEvent carrying additional + * information whether the event origins from a maker change. *

* ProblemsLabelChangedEvents are only generated by * ProblemsLabelDecorators. *

*/ public static class ProblemsLabelChangedEvent extends LabelProviderChangedEvent { - private boolean fMarkerChange; /** * Note: This constructor is for internal use only. Clients should not call this constructor. */ - public ProblemsLabelChangedEvent(IBaseLabelProvider source, IResource[] changedResource, boolean isMarkerChange) { + public ProblemsLabelChangedEvent(IBaseLabelProvider source, IResource[] changedResource, + boolean isMarkerChange) { super(source, changedResource); fMarkerChange= isMarkerChange; } @@ -80,14 +79,13 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe public boolean isMarkerChange() { return fMarkerChange; } - } private static final int ERRORTICK_WARNING= CElementImageDescriptor.WARNING; private static final int ERRORTICK_ERROR= CElementImageDescriptor.ERROR; private ImageDescriptorRegistry fRegistry; - private boolean fUseNewRegistry= false; + private boolean fUseNewRegistry; private IProblemChangedListener fProblemChangedListener; private ListenerList fListeners; @@ -119,7 +117,6 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe return fRegistry; } - @Override public String decorateText(String text, Object element) { return text; @@ -175,7 +172,8 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe return 0; } - private int getErrorTicksFromMarkers(IResource res, int depth, ISourceReference sourceElement) throws CoreException { + private int getErrorTicksFromMarkers(IResource res, int depth, ISourceReference sourceElement) + throws CoreException { if (res == null || !res.isAccessible()) { return 0; }