Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.handly.ui.viewer.ProblemLabelDecorator

        org.eclipse.handly.ui.viewer.ProblemLabelDecorator.Severity
    • 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
      • Methods inherited from class org.eclipse.handly.ui.viewer.ProblemLabelDecorator

        addListener, decorateText, decorateText, dispose, isLabelProperty, prepareDecoration, removeListener
    • Constructor Detail

      • BslLabelDecorator

        public BslLabelDecorator()
    • Method Detail

      • decorateImage

        public org.eclipse.swt.graphics.Image decorateImage​(org.eclipse.swt.graphics.Image image,
                                                            Object element,
                                                            IDecorationContext context)
        Overrides:
        decorateImage in class org.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 interface ILabelDecorator
        Overrides:
        decorateImage in class org.eclipse.handly.ui.viewer.ProblemLabelDecorator
      • elementChanged

        public void elementChanged​(org.eclipse.handly.model.IElementChangeEvent event)
        Specified by:
        elementChanged in interface org.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 class org.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. If textRange is not null, only markers strictly covered by the given text range are considered. Returns null if there are no matching markers. This method cache position and severity of each marker. Cache will be drop when elementChanged(IElementChangeEvent) was called.
        Parameters:
        resource - not null
        depth - how far to recurse (see IResource.DEPTH_* )
        textRange - the text range to further constrain the marker set, or null. 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