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 Plug-in Developer Guide
Previous Page Home Next Page

Annotation Types

Identifier:
org.eclipse.ui.editors.annotationTypes

Since:
3.0

Description:
An Annotation is a piece of information attached to a certain region of a text document. New kinds of annotations may be defined using this extension point. Annotations are attached to documents via their annotation model and may be displayed in text editors and views. Annotation types form a hierarchy: an annotation type may refine another type by specifying it in its super attribute. Some annotations serve as the UI counterpart of markers (see org.eclipse.core.resources.IMarker), while others exist on their own without having a persistable form. The mapping between markers and annotation types is defined by the optional markerType and markerSeverity attributes.

Configuration Markup:

<!ELEMENT extension ( type+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>

  • point - a fully qualified identifier of the target extension point
  • id - an optional identifier of the extension instance
  • name - an optional name of the extension instance

<!ELEMENT type EMPTY>

<!ATTLIST type

name           CDATA #REQUIRED

markerType     IDREF #IMPLIED

super          IDREF #IMPLIED

markerSeverity (0|1|2)

>

A marker type definition.


  • name - the unique name of this annotation type. This is used whenever an annotation type is referenced, e.g. when specifying an org.eclipse.ui.editors.markerAnnotationSpecification.
  • markerType - the marker type that this annotation type corresponds to, if any
  • super - the name of the parent type, if this type is a descendant of another annotation type
  • markerSeverity - the optional severity of this annotation type, used for mapping an annotation type to a marker. Any out of IMarker.SEVERITY_INFO, IMarker.SEVERITY_WARNING, SEVERITY_ERROR.

Examples:
This is an excerpt from the plugin.xml for JDT UI, which adds the java compiler error and warning annotations:

   <extension
         point=
"org.eclipse.ui.editors.annotationTypes"
>
      <type
         name=
"org.eclipse.jdt.ui.error"

         super=
"org.eclipse.ui.workbench.texteditor.error"

         markerType=
"org.eclipse.jdt.core.problem"

         markerSeverity=
"2"
>
      </type>
      <type
         name=
"org.eclipse.jdt.ui.warning"

         super=
"org.eclipse.ui.workbench.texteditor.warning"

         markerType=
"org.eclipse.jdt.core.problem"

         markerSeverity=
"1"
>
      </type>
      <type
         name=
"org.eclipse.jdt.ui.info"

         super=
"org.eclipse.ui.workbench.texteditor.info"

         markerType=
"org.eclipse.jdt.core.problem"

         markerSeverity=
"0"
>
      </type>
   </extension>


Copyright (c) 2001, 2008 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v10.html


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