Package org.eclipse.handly.ui.viewer
Class ProblemLabelDecorator
java.lang.Object
org.eclipse.jface.viewers.LabelDecorator
org.eclipse.handly.ui.viewer.ProblemLabelDecorator
- All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider,org.eclipse.jface.viewers.ILabelDecorator
- Direct Known Subclasses:
ProblemMarkerLabelDecorator
public abstract class ProblemLabelDecorator
extends org.eclipse.jface.viewers.LabelDecorator
implements org.eclipse.jface.viewers.ILabelDecorator
An abstract base class for decorating an element's image with error and
warning overlays. Subclasses must implement the
computeProblemSeverity method.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumIndicates problem severity. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(org.eclipse.jface.viewers.ILabelProviderListener listener) protected abstract ProblemLabelDecorator.SeveritycomputeProblemSeverity(Object element, org.eclipse.jface.viewers.IDecorationContext context) Computes problem severity for the given element taking into account the provided context.org.eclipse.swt.graphics.ImagedecorateImage(org.eclipse.swt.graphics.Image image, Object element) org.eclipse.swt.graphics.ImagedecorateImage(org.eclipse.swt.graphics.Image image, Object element, org.eclipse.jface.viewers.IDecorationContext context) decorateText(String text, Object element) decorateText(String text, Object element, org.eclipse.jface.viewers.IDecorationContext context) voiddispose()booleanisLabelProperty(Object element, String property) booleanprepareDecoration(Object element, String originalText, org.eclipse.jface.viewers.IDecorationContext context) voidremoveListener(org.eclipse.jface.viewers.ILabelProviderListener listener)
-
Constructor Details
-
ProblemLabelDecorator
public ProblemLabelDecorator()
-
-
Method Details
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, Object element, org.eclipse.jface.viewers.IDecorationContext context) - Specified by:
decorateImagein classorg.eclipse.jface.viewers.LabelDecorator
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, Object element) - Specified by:
decorateImagein interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
decorateText
public String decorateText(String text, Object element, org.eclipse.jface.viewers.IDecorationContext context) - Specified by:
decorateTextin classorg.eclipse.jface.viewers.LabelDecorator
-
decorateText
- Specified by:
decorateTextin interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
prepareDecoration
public boolean prepareDecoration(Object element, String originalText, org.eclipse.jface.viewers.IDecorationContext context) - Specified by:
prepareDecorationin classorg.eclipse.jface.viewers.LabelDecorator
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
isLabelProperty
- Specified by:
isLabelPropertyin interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
addListener
public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) - Specified by:
addListenerin interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
removeListener
public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) - Specified by:
removeListenerin interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
computeProblemSeverity
protected abstract ProblemLabelDecorator.Severity computeProblemSeverity(Object element, org.eclipse.jface.viewers.IDecorationContext context) Computes problem severity for the given element taking into account the provided context.- Parameters:
element- nevernullcontext- nevernull- Returns:
- problem severity, or
nullif there is no problem
-