Class MarkerAnnotation

    • Constructor Detail

      • MarkerAnnotation

        public MarkerAnnotation​(IMarker marker)
        Creates a new annotation for the given marker.
        Parameters:
        marker - the marker
      • MarkerAnnotation

        public MarkerAnnotation​(String annotationType,
                                IMarker marker)
        Creates a new annotation of the given type for the given marker.
        Parameters:
        annotationType - the annotation type
        marker - the marker
        Since:
        3.0
    • Method Detail

      • getImage

        @Deprecated
        protected static Image getImage​(Display display,
                                        ImageDescriptor descriptor)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Returns an image for the given display as specified by the given image descriptor.
        Parameters:
        display - the display
        descriptor - the image descriptor
        Returns:
        an image for the display as specified by the descriptor
      • getImageRegistry

        @Deprecated
        protected static Map<ImageDescriptor,​Image> getImageRegistry​(Display display)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Returns an image registry for the given display. If no such registry exists the registry is created.
        Parameters:
        display - the display
        Returns:
        the image registry for the given display
      • setImage

        @Deprecated
        protected void setImage​(Image image)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Sets the marker image to the given image.
        Parameters:
        image - the new marker image
      • initialize

        @Deprecated
        protected void initialize()
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Initializes the annotation's icon representation and its drawing layer based upon the properties of the underlying marker.
      • setLayer

        @Deprecated
        protected void setLayer​(int layer)
        Deprecated.
        As of 3.0, annotation with a visible presentation should implement IAnnotationPresentation
        Sets the layer of this annotation.

        Note: This is only for backward compatibility.

        Parameters:
        layer - the layer of this annotation
        Since:
        3.0
      • update

        public void update()
        Informs this annotation about changes applied to its underlying marker and adapts to those changes.
        Overrides:
        update in class SimpleMarkerAnnotation
      • getUnknownImageName

        @Deprecated
        protected String getUnknownImageName​(IMarker marker)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Returns the name of an image used to visually represent markers of unknown type. This implementation returns null. Subclasses may replace this method.
        Parameters:
        marker - the marker of unknown type
        Returns:
        the name of an image for markers of unknown type.
      • getImage

        @Deprecated
        protected Image getImage​(String name)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Returns the image of the given name. Subclasses may extend this method. If so, subclasses must assume responsibility for disposing the images they create.
        Parameters:
        name - the name of the requested image
        Returns:
        the image or null if there is no such image
      • getImage

        @Deprecated
        protected Image getImage​(Display display)
        Deprecated.
        As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
        Returns an image for this annotation. It first consults the workbench adapter for this annotation's marker. If none is defined, it tries to find an image for the image name of this annotation.
        Parameters:
        display - the display for which the image is requested
        Returns:
        the image for this annotation
      • setQuickFixable

        public void setQuickFixable​(boolean state)
        Sets whether there are quick fixes available for this annotation.
        Specified by:
        setQuickFixable in interface IQuickFixableAnnotation
        Parameters:
        state - true if there are quick fixes available, false otherwise
        Since:
        3.4