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.ILabelDecoratorAn abstract base class for decorating an element's image with error and warning overlays. Subclasses must implement thecomputeProblemSeveritymethod.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classProblemLabelDecorator.SeverityIndicates problem severity.
-
Constructor Summary
Constructors Constructor Description ProblemLabelDecorator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddListener(org.eclipse.jface.viewers.ILabelProviderListener listener)protected abstract ProblemLabelDecorator.SeveritycomputeProblemSeverity(java.lang.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, java.lang.Object element)org.eclipse.swt.graphics.ImagedecorateImage(org.eclipse.swt.graphics.Image image, java.lang.Object element, org.eclipse.jface.viewers.IDecorationContext context)java.lang.StringdecorateText(java.lang.String text, java.lang.Object element)java.lang.StringdecorateText(java.lang.String text, java.lang.Object element, org.eclipse.jface.viewers.IDecorationContext context)voiddispose()booleanisLabelProperty(java.lang.Object element, java.lang.String property)booleanprepareDecoration(java.lang.Object element, java.lang.String originalText, org.eclipse.jface.viewers.IDecorationContext context)voidremoveListener(org.eclipse.jface.viewers.ILabelProviderListener listener)
-
-
-
Method Detail
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, java.lang.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, java.lang.Object element)- Specified by:
decorateImagein interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
decorateText
public java.lang.String decorateText(java.lang.String text, java.lang.Object element, org.eclipse.jface.viewers.IDecorationContext context)- Specified by:
decorateTextin classorg.eclipse.jface.viewers.LabelDecorator
-
decorateText
public java.lang.String decorateText(java.lang.String text, java.lang.Object element)- Specified by:
decorateTextin interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
prepareDecoration
public boolean prepareDecoration(java.lang.Object element, java.lang.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
public boolean isLabelProperty(java.lang.Object element, java.lang.String property)- 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(java.lang.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
-
-