Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tigerstripe-dev] RE: So.... another issue with Annotations.

So, I tried to fix ProviderContext, but it doesn't have visibility of the class.
 
I did manage to fix this by adding a provider defintion for IField. BUt this seems fairly ugly.
 
Not sure what the right fix is for this. May need to resolve the provider in the context of the provider...
 
Steve


From: Steve Jerman (stjerman)
Sent: Wednesday, June 25, 2008 2:53 PM
To: 'Tigerstripe developers list'
Subject: So.... another issue with Annotations.

I have been defining quite a few annotations. However, some are not working :)
 
The situation is this..
 
Define an annotation thus:
 
   <extension
         point="org.eclipse.tigerstripe.annotation.core.annotationType">
      <definition
            description="Persistence Hints"
            eclass="TransientHint"
            epackage-uri="http://com.cisco.tigerstripe.annotation.chameleon.persistence"
            id="com.cisco.tigerstripe.annotation.chameleon.persistence.inheritance"
            name="Transient">
         <target
               type="org.eclipse.tigerstripe.workbench.model.deprecated_.IField"
               unique="true">
         </target>
         <target
               type="org.eclipse.tigerstripe.workbench.model.deprecated_.IManagedEntityArtifact"
               unique="true">
         </target>
      </definition>
   </extension>
 
The annotations all pop up in the 'create' box correctly (against the right objects), but nothing happens when I try to create one...
 
Looking at org.eclipse.tigerstripe.annotation.internal.core.ProviderManager, it seems to be doing string comparisons on the target type against the Provider type:
 
 <extension
   point="org.eclipse.tigerstripe.annotation.core.annotationProvider">
  <provider
   id="org.eclipse.tigerstripe.annotation.tsmodel.provider"
   class="org.eclipse.tigerstripe.annotation.tsmodel.TSModelAnnotationProvider"
   targetDescription="Model Component"
   type="org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponent">
    <delegate type="org.eclipse.jdt.core.IJavaElement"/>
  </provider>
 </extension>
 
I may be long at this wrongly, but that would be my best guess at whats going wrong - that the classes should be loaded and a check to see if its a subclass made. Any thoughts?
 
Steve

Back to the top