Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

Custom Annotation Property Views

< To: Tigerstripe_APIs


Annotation Framework support 4 ways to extend Annotation Property View: override properties section, add properties tabs, add annotation actions and register custom properties editors.

Custom Annotation Property Section

Tigerstripe Annotation Custom Section.jpg

To replace annotation property section in the Annotation Property View we need to provide new section and annotation filter. Annotation Property View based on the tabbed properties, so customizing can be done using extension point:

 <extension point="">
   <propertySections contributorId="">
  • contributorId="" - identifier of the annotation property page contributor.
  • tab="" - identifier of the properties tab which we want to override.
  • class - annotation section class. This class should extend class:
 public class CustomSection extends AnnotationPropertiesSection {
   public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
     //create section controls
   protected void updateSection(Annotation annotation) {
     //update section when selected annotation changed
  • filter - annotation filter determines if annotation section should be overridden. Annotation filter should extend class:
 public CustomAnnotationFilter extends AnnotationFilter {
   public boolean select(Annotation annotation) {
     //return true if section should be overridden for the specified annotation
  • id - the unique identifier for the section

Add Annotation Property Tab

Tigerstripe Annotation Custom Tab.jpg

Another way to extend Annotation Properties View is add own property tab. To define new tab we need to use extension point:

       label="Example Section"/>
  • contributorId="" - identifier of the annotation property page contributor.
  • category="Properties" - identifier of the properties tab category.
  • label - the label to be displayed on the tab.
  • id - the unique id for the tab.

Next step - provide custom annotation property section (as described above) with custom tab identifier (in this case tab="").

Contribute Annotation Actions

Custom actions can be contributed to the Annotation Property View using standard org.eclipse.ui.popupMenus extension point with the annotationProperties<i> as menubar path and <i>org.eclipse.tigerstripe.annotation.core.Annotation as selection:


Register Properties Editors

To provide custom properties we need to register property provider using org.eclipse.tigerstripe.annotation.ui.propertyProvider extension point:

  • class - property provider class implemented interface:
 public class GeneralPropertyProvider implements EPropertyProvider {
   public EProperty getProperty(EObject object, EStructuralFeature feature) {
     //return EProperty for the object feature or null if this provider do not provide properties for this feature
  • priority - the priority of the provider. It should be positive integer. A provider at a higher priority will take a chance first at deciding provision.

EProperty customize property display name, value, cell editor and so on. Clients should not implement this interface directly, but should extend implementation.

Back to the top