1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 05:25:21 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-01-20 21:33:55 -08:00
parent 5b3ed2f9c1
commit 7b619824e8

View file

@ -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 <code>IMarker.PROBLEM</code>.
* a problem decoration for a marker, the marker needs to be a subtype of {@code IMarker.PROBLEM}.
* <p>
* Note: Only images for elements in Java projects are currently updated on marker changes.
* </p>
@ -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 <code>LabelProviderChangedEvent</code> carring additional
* information whether the event orgins from a maker change.
* This is a special <code>LabelProviderChangedEvent</code> carrying additional
* information whether the event origins from a maker change.
* <p>
* <code>ProblemsLabelChangedEvent</code>s are only generated by <code>
* ProblemsLabelDecorator</code>s.
* </p>
*/
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;
}