Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tigerstripe-dev] TAF New API Migration Guide


1. Annotation adapter factory was removed and it's logic migrated to the IAnnotationProvider:

public interface IAnnotationProvider {
     * Return annotable object by URI
     * @param uri
     * @return annotable object
    public Object getObject(URI uri);
     * Return annotable object URI
     * @return annotable object URI
    public URI getUri(Object object);


So, to migrate this version you need to move adapter factory logic to the annotation provider method getUri(Object object). You also needn't use IAnnotable interface as URI container, because this method return URI directly.

2. IAnnotationProvider bound to some java type. For example, JavaProvider bound to the IJavaElement, ResourceProvider bound to the IResource. This type should be declared with the org.eclipse.tigerstripe.annotation.core.annotationProvider extension point in the type field. Human-readable description of this type should be also added with the targetDescription field.

3. Another IAnnotationProvider feature is delegating to other providers. Sometimes, annotations added to the IResource can be also used as annotations added to corresponding IJavaElement. In this case, annotation provider should describe all delegating information using delegate property. For example, JavaAnnotationProvider delegate to the ResourceAnnotationProvider using following declaration:

    targetDescription="Java Element"
  <delegate type="org.eclipse.core.resources.IResource"/>

Annotation Type target

Annotation type target allow to add annotations with the specified type only for specified annotable objects. For example, MimeType annotation can be attached only to the IResource:

  <extension point="org.eclipse.tigerstripe.annotation.core.annotationType">
           name="MIME Type"

If there are no one target defined, annotation of this type can be attached to any annotable objects.

Annotation type images

annotationTypeImages extension point replaced with the annotationLabelProvider extension point. This new extension provide JFace label provider which will be used in the UI to display annotations.


Router API didn't change at all. But most probably router try to get annotated object by annotation with the following code:

    URI uri = annotation.getUri();
    Object annotable = AnnotationPlugin.getManager().getObject(uri);

URI logic completely removed from the IAnnotationManager. So this code should be replaced with the following:

    Object annotable = AnnotationPlugin.getManager().getAnnotatedObject(annotation);

Refactoring support

Refactoring support moved to TAF core. So, old refactoring support extension point:


should be replaced with the org.eclipse.tigerstripe.annotation.core.refactoringSupport extension point:


Best regards,
Yuri Strot

Back to the top