Package com._1c.g5.v8.dt.bsl.ui.outline
Class BslLabelDecorator
- java.lang.Object
-
- org.eclipse.jface.viewers.LabelDecorator
-
- org.eclipse.handly.ui.viewer.ProblemLabelDecorator
-
- org.eclipse.handly.ui.viewer.ProblemMarkerLabelDecorator
-
- com._1c.g5.v8.dt.bsl.ui.outline.BslLabelDecorator
-
- All Implemented Interfaces:
org.eclipse.handly.model.IElementChangeListener
,IBaseLabelProvider
,ILabelDecorator
public class BslLabelDecorator extends org.eclipse.handly.ui.viewer.ProblemMarkerLabelDecorator implements org.eclipse.handly.model.IElementChangeListener
Bsl label decorator
-
-
Constructor Summary
Constructors Constructor Description BslLabelDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.handly.ui.viewer.ProblemLabelDecorator.Severity
computeProblemSeverityFromMarkers(Object element, IDecorationContext context)
org.eclipse.swt.graphics.Image
decorateImage(org.eclipse.swt.graphics.Image image, Object element)
org.eclipse.swt.graphics.Image
decorateImage(org.eclipse.swt.graphics.Image image, Object element, IDecorationContext context)
void
elementChanged(org.eclipse.handly.model.IElementChangeEvent event)
protected org.eclipse.handly.ui.viewer.ProblemLabelDecorator.Severity
findMaxProblemSeverityWithCache(org.eclipse.core.resources.IResource resource, int depth, org.eclipse.handly.util.TextRange textRange)
Returns the maximum severity across problem markers attached to the given resource, and, optionally, to its descendants.-
Methods inherited from class org.eclipse.handly.ui.viewer.ProblemMarkerLabelDecorator
computeProblemSeverity, findMaxProblemSeverity, getContentAdapter
-
-
-
-
Method Detail
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, Object element, IDecorationContext context)
- Overrides:
decorateImage
in classorg.eclipse.handly.ui.viewer.ProblemLabelDecorator
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, Object element)
- Specified by:
decorateImage
in interfaceILabelDecorator
- Overrides:
decorateImage
in classorg.eclipse.handly.ui.viewer.ProblemLabelDecorator
-
elementChanged
public void elementChanged(org.eclipse.handly.model.IElementChangeEvent event)
- Specified by:
elementChanged
in interfaceorg.eclipse.handly.model.IElementChangeListener
-
computeProblemSeverityFromMarkers
protected org.eclipse.handly.ui.viewer.ProblemLabelDecorator.Severity computeProblemSeverityFromMarkers(Object element, IDecorationContext context) throws org.eclipse.core.runtime.CoreException
- Overrides:
computeProblemSeverityFromMarkers
in classorg.eclipse.handly.ui.viewer.ProblemMarkerLabelDecorator
- Throws:
org.eclipse.core.runtime.CoreException
-
findMaxProblemSeverityWithCache
protected org.eclipse.handly.ui.viewer.ProblemLabelDecorator.Severity findMaxProblemSeverityWithCache(org.eclipse.core.resources.IResource resource, int depth, org.eclipse.handly.util.TextRange textRange) throws org.eclipse.core.runtime.CoreException
Returns the maximum severity across problem markers attached to the given resource, and, optionally, to its descendants. IftextRange
is notnull
, only markers strictly covered by the given text range are considered. Returnsnull
if there are no matching markers. This method cache position and severity of each marker. Cache will be drop whenelementChanged(IElementChangeEvent)
was called.- Parameters:
resource
- notnull
depth
- how far to recurse (seeIResource.DEPTH_*
)textRange
- the text range to further constrain the marker set, ornull
. Makes sense only if the given resource is a text file- Returns:
- the maximum problem severity, or
null
- Throws:
org.eclipse.core.runtime.CoreException
- occurred when- This resource does not exist.
- This resource is a project that is not open
-
-