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
Answertopia.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.jface.text.source
Interface IAnnotationAccessExtension

All Known Implementing Classes:
DefaultMarkerAnnotationAccess

public interface IAnnotationAccessExtension

Extension interface for IAnnotationAccess.

This interface replaces the methods of IAnnotationAccess.

This interface provides

  • a label for the annotation type of a given annotation
  • the paint layer of a given annotation
  • means to paint a given annotation
  • information about the type hierarchy of the annotation type of a given annotation
    • .

      Since:
      3.0
      See Also:
      IAnnotationAccess

      Field Summary
      static int DEFAULT_LAYER
                The default annotation layer.
       
      Method Summary
       int getLayer ( Annotation annotation)
                Returns the layer for given annotation.
        Object[] getSupertypes ( Object annotationType)
                Returns the list of super types for the given annotation type.
        String getTypeLabel ( Annotation annotation)
                Returns the label for the given annotation's type.
       boolean isPaintable ( Annotation annotation)
                Returns true if painting annotation will produce something meaningful, false if not.
       boolean isSubtype ( Object annotationType, Object potentialSupertype)
                Returns true if the given annotation is of the given type or false otherwise.
       void paint ( Annotation annotation, GC gc, Canvas canvas, Rectangle bounds)
                Draws a graphical representation of the given annotation within the given bounds.
       

      Field Detail

      DEFAULT_LAYER

      static final int DEFAULT_LAYER
      
      The default annotation layer.

      See Also:
      Constant Field Values
      Method Detail

      getTypeLabel

      
      String getTypeLabel(
      Annotation annotation)
      Returns the label for the given annotation's type.

      Parameters:
      annotation - the annotation
      Returns:
      the label the given annotation's type or null if no such label exists

      getLayer

      int getLayer(
      Annotation annotation)
      Returns the layer for given annotation. Annotations are considered being located at layers and are considered being painted starting with layer 0 upwards. Thus an annotation at layer 5 will be drawn on top of all co-located annotations at the layers 4 - 0.

      Parameters:
      annotation - the annotation
      Returns:
      the layer of the given annotation

      paint

      void paint(
      Annotation annotation,
                 
      GC gc,
                 
      Canvas canvas,
                 
      Rectangle bounds)
      Draws a graphical representation of the given annotation within the given bounds.

      Note that this method is not used when drawing annotations on the editor's text widget. This is handled trough a AnnotationPainter.IDrawingStrategy.

      Parameters:
      annotation - the given annotation
      gc - the drawing GC
      canvas - the canvas to draw on
      bounds - the bounds inside the canvas to draw on

      isPaintable

      boolean isPaintable(
      Annotation annotation)
      Returns true if painting annotation will produce something meaningful, false if not. E.g. if no image is available.

      Note that this method is not used when drawing annotations on the editor's text widget. This is handled trough a AnnotationPainter.IDrawingStrategy.

      Parameters:
      annotation - the annotation to check whether it can be painted
      Returns:
      true if painting annotation will succeed

      isSubtype

      boolean isSubtype(
      Object annotationType,
                        
      Object potentialSupertype)
      Returns true if the given annotation is of the given type or false otherwise.

      Parameters:
      annotationType - the annotation type
      potentialSupertype - the potential super annotation type
      Returns:
      true if annotation type is a sub-type of the potential annotation super type

      getSupertypes

      
      Object[] getSupertypes(
      Object annotationType)
      Returns the list of super types for the given annotation type. This does not include the type itself. The index in the array of super types indicates the length of the path in the hierarchy graph to the given annotation type.

      Parameters:
      annotationType - the annotation type to check
      Returns:
      the super types for the given annotation type

      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