Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.texteditor
Class MarkerAnnotation

java.lang.Object
  extended by 

org.eclipse.jface.text.source.Annotation
      extended by 

org.eclipse.ui.texteditor.SimpleMarkerAnnotation
          extended by 
org.eclipse.ui.texteditor.MarkerAnnotation
All Implemented Interfaces:
IQuickFixableAnnotation

public class MarkerAnnotation
extends SimpleMarkerAnnotation
implements IQuickFixableAnnotation

Annotation representing a marker on a resource in the workspace. This class may be instantiated or be subclassed.

See Also:
IMarker

Field Summary
static int PROBLEM_LAYER
          Deprecated. As of 3.0, replaced by IAnnotationAccessExtension
 
Fields inherited from class org.eclipse.jface.text.source. Annotation
TYPE_UNKNOWN
 
Constructor Summary
MarkerAnnotation ( IMarker marker)
          Creates a new annotation for the given marker.
MarkerAnnotation ( String annotationType, IMarker marker)
          Creates a new annotation of the given type for the given marker.
 
Method Summary
protected   Image getImage ( Display display)
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
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
protected   Image getImage ( String name)
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
protected static  Map getImageRegistry ( Display display)
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
 int getLayer ()
          Deprecated. As of 3.0, replaced by IAnnotationAccessExtension.getLayer(org.eclipse.jface.text.source.Annotation)
protected   String getUnknownImageName ( IMarker marker)
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
protected  void initialize ()
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
 boolean isQuickFixable ()
          Tells whether there are quick fixes for this annotation.
 boolean isQuickFixableStateSet ()
          Tells whether the quick fixable state has been set.
 void paint ( GC gc, Canvas canvas, Rectangle r)
          Deprecated. As of 3.0 replaced by IAnnotationAccessExtension.paint(org.eclipse.jface.text.source.Annotation, GC, Canvas, Rectangle)
protected  void setImage ( Image image)
          Deprecated. As of 3.0, visual presentation is no longer supported, annotation with a visible presentation should implement IAnnotationPresentation
protected  void setLayer (int layer)
          Deprecated. As of 3.0, annotation with a visible presentation should implement IAnnotationPresentation
 void setQuickFixable (boolean state)
          Sets whether there are quick fixes available for this annotation.
 void update ()
          Informs this annotation about changes applied to its underlying marker and adapts to those changes.
 
Methods inherited from class org.eclipse.ui.texteditor. SimpleMarkerAnnotation
equals, getMarker, getText, hashCode
 
Methods inherited from class org.eclipse.jface.text.source. Annotation
getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROBLEM_LAYER

public static final int PROBLEM_LAYER
Deprecated. As of 3.0, replaced by IAnnotationAccessExtension
The layer in which markers representing problem are located.

Since:
2.0
See Also:
Constant Field Values
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

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

protected static 
Map 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

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

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.


getLayer

public int getLayer()
Deprecated. As of 3.0, replaced by IAnnotationAccessExtension.getLayer(org.eclipse.jface.text.source.Annotation)

Returns the annotations drawing layer.

Note: This is only for backward compatibility.

Returns:
the annotations drawing layer
Since:
3.0

setLayer

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

paint

public void paint(
GC gc,
                  
Canvas canvas,
                  
Rectangle r)
Deprecated. As of 3.0 replaced by IAnnotationAccessExtension.paint(org.eclipse.jface.text.source.Annotation, GC, Canvas, Rectangle)

Implement this method to draw a graphical representation of this annotation within the given bounds. This default implementation does nothing.

Note: This is only for backward compatibility.

Parameters:
gc - the drawing GC
canvas - the canvas to draw on
r - the bounds inside the canvas to draw on
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

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

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

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

isQuickFixableStateSet

public boolean isQuickFixableStateSet()
Tells whether the quick fixable state has been set.

Normally this means IQuickFixableAnnotation.setQuickFixable(boolean) has been called at least once but it can also be hard-coded, e.g. always return true.

Specified by:
isQuickFixableStateSet in interface IQuickFixableAnnotation
Returns:
true if the state has been set
Since:
3.4

isQuickFixable

public boolean isQuickFixable()
Tells whether there are quick fixes for this annotation.

Note: This method must only be called if IQuickFixableAnnotation.isQuickFixableStateSet() returns true.

Specified by:
isQuickFixable in interface IQuickFixableAnnotation
Returns:
true if this annotation offers quick fixes
Since:
3.4

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire