Skip to main content

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

Looks like its working now.

Thanks
Steve 

-----Original Message-----
From: Yuri Strot [mailto:yuri@xxxxxxxxx] 
Sent: Thursday, June 26, 2008 6:08 AM
To: Tigerstripe developers list
Cc: Steve Jerman (stjerman)
Subject: Re: [tigerstripe-dev] RE: So.... another issue with
Annotations.


Hi Steve,

Thanks for your comments. In fact, ProviderContext is not a good place
to do this fix because it's just a container for provider extension
point description. I've fixed problem you described in the
AnnotationManager
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=238525) and I've checked
it at the org.eclipse.core.resources.IProject
annotation target. So, I believe your example would also works fine.

--
Best regards,
Yuri Strot


----- Original Message -----
From: Steve Jerman (stjerman) <stjerman@xxxxxxxxx>
To: Steve Jerman (stjerman) <stjerman@xxxxxxxxx>, Tigerstripe developers
list <tigerstripe-dev@xxxxxxxxxxx>
Sent: Thu, 26 Jun 2008 05:34:31 +0700 (NOVST)
Subject: [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.persiste
nce"
 
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_.IManagedEntity
Artifact"
               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.TSModelAnnotationProvi
der"
   targetDescription="Model Component"
 
type="org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponen
t">
    <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