Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tigerstripe-dev] Re: Annotations and routers: how does it work?

Hi Yuri,

Thanks for the quick fix.

Cheers,
Eric


On 6/12/08 7:06 PM, "Yuri Strot" <yuri@xxxxxxxxx> wrote:

> 
> Hi Eric,
> 
> I used the latest version from the CVS and found the problem. It was in the
> wrong annotation file detection
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=236997). Now scenario you
> described works fine. I've also try to create more annotations, restart
> Eclipse and so on.
> 
> --
> Best regards,
> Yuri Strot.
> 
> ------------------------------
> 
> Hmmm... For some reason the build I’m mentioning here does not want to
> appear on the http://www.eclipse.org/tigerstripe/downloads.php page,
> although I can see it when I ssh into the eclipse server directly.
> 
> Something seems different in the way the partitions are mounted on the
> Eclipse webserver today.
> 
> I’ve contacted them for help.
> 
> Eric
> 
> 
> On 6/12/08 3:30 PM, "Eric Dillon" <erdillon@xxxxxxxxx> wrote:
> 
>> OK. I did make the change to create PlatformResourceURI as this was clearly a
>> bug. However, I’m seeing no difference in behavior.
>> 
>> To try it, here is “simple” scenario, from scratch that corresponds to a
>> typical first install scenario:
>> 
>> * unzip the latest Eclipse 3.3.2
>> * download the latest bundle-tigerstripe-workbench-XXXXX.zip (take the latest
>> N-build to make sure you get the right type URIs, anything after
>> N200606121727
>> will do it), it contains the TS plugins + all the EMF, GMF, etc... And unzip
>> on top of the eclipse install from the first step.
>> * Use the annotation definition from
>> http://wiki.eclipse.org/Define_Tigerstripe_Annotations
>>>>        It contains a .zip file version  of the Annotation example that you
>>>> can “export” to install as a plugin the environment above.
>>>> * Import the Tigerstripe Project as attached. I created it with the
>>>> environment above. I contains a
>>>> annotations/org.eclipse.tigerstripe.annotation.example.ann file which has a
>>>> single annotation defined on com.mycompany.Entity0.
>>>> * Switch to the Tigerstripe perspective and check that NO ANNOTATION is
>>>> displayed when you either select Entity0 from the explorer or from the
>>>> “classy” class diagram.
>>>> 
>>>> I would have expected that upon import (similarly as upon a first CVS
>>>> checkout) this would work. Note that there is nothing for the TAF to
>>>> remember here.
>>>> That being said, after creating and exporting the project attached, I
>>>> stopped Eclipse and restarted and the annotations didn’t reappear either.
>>>> 
>>>> Please advise,
>>>> Eric
>>>> 
>>>> 
>>>> On 6/12/08 8:47 AM, "Andrey Platov" <andrey@xxxxxxxxx> wrote:
>>>> 
>>>>> Hi folks,
>>>>> 
>>>>> I'd like to add a short clarification to Yuri's email:
>>>>> 
>>>>> 1) TAF routers should work well in current version, and will put your
>>>>> annotations wherever you specify (of course remembering that location).
>>>>> 2) Current TS router creates "file://" EMF URI, which is used by EMF to
>>>>> create .ann file on the filesystem. This is not correct if .ann files will
>>>>> be stored within Eclipse Workspace. If you'd like to create .ann file as
>>>>> Workspace resource (file which belongs to Eclipse project) you shall
>>>>> create
>>>>> "platform://" EMF URI using URI.createPlatformResourceURI(...) as Yuri
>>>>> mentioned. In this case EMF will use Eclipse Resource API, and .ann files
>>>>> will be visible to Eclipse (including TAF). Indirect access to Eclipse
>>>>> Resources (bypassing Resource API) makes workspace out of sync with actual
>>>>> filesystem content, which is probably the problem we have in TS router.
>>>>> 
>>>>> Please update us if you need more info on this.
>>>>> 
>>>>> Kind Regards,
>>>>> Andrey
>>>>> 
>>>>> 
>>>>> ----- Original Message -----
>>>>> From: "Yuri Strot" <yuri@xxxxxxxxx>
>>>>> To: "Eric Dillon" <erdillon@xxxxxxxxx>
>>>>> Cc: "Andrey Platov" <andrey@xxxxxxxxx>, "Tigerstripe Developers"
>>>>> <tigerstripe-dev@xxxxxxxxxxx>
>>>>> Sent: Thursday, June 12, 2008 1:04:04 PM GMT +06:00 Almaty, Novosibirsk
>>>>> Subject: Re: Annotations and routers: how does it work?
>>>>> 
>>>>> Hi Eric,
>>>>> 
>>>>> TAF remember all files where you route annotations. I tested tigerstripe
>>>>> and didn't find any problems (after Eclipse restarting all annotations
>>>>> successfully restored when I select corresponding elements). However, I
>>>>> don't find a way to store annotations in separate files (all of them
>>>>> stored
>>>>> in the /annotations/org.eclipse.tigerstripe.annotation.core.test.ann
>>>>> file).
>>>>> 
>>>>> I've also found that your router use file URI (URI.createFileURI(...)). In
>>>>> fact, it's better to use platform URI (URI.createPlatformResourceURI(...))
>>>>> because when you create EMF file resource it will be asynch with the
>>>>> workspace. Since we support *.ann files renaming, moving, etc. it can be
>>>>> the problem because when this resource will be synch with the workspace it
>>>>> will be interpreted by the TAF as new *.ann file. It's make framework not
>>>>> so flexible and I belive in future we will solve this problem, but while
>>>>> please use platform resources (you can found complete example in the
>>>>> org.eclipse.tigerstripe.annotation.example.router plug-in).
>>>>> 
>>>>> If this is not a file resource problem please describe how we can
>>>>> reproduce
>>>>> it (which project, artifacts, annotations, etc. should be created).
>>>>> 
>>>>> --
>>>>> Best regards,
>>>>> Yuri Strot
>>>>> 
>>>>> ------------------------------
>>>>> 
>>>>> Hi Andrey, Yuri,
>>>>> 
>>>>> I¹m testing the integration of Tigerstripe with the TAF, and finding some
>>>>> problems around the ³routing² mechanism for storage.
>>>>> As mentioned before, in the Tigerstripe case, routing of all
>>>>> ³tigerstripe://...² annotations will be done to .ann files in the local
>>>>> project. (see code in
>>>>> org.eclipse.tigerstripe.annotation.ts2project.router).
>>>>> What we do there is basically route based on the nsURI of the target
>>>>> annotation, so that all ³DesignNotes² will go into a single file, all
>>>>> ³HibernateHints² will go into another single file, etc...
>>>>> That way we can choose to include a .ann file or not to provide the
>>>>> corresponding annotations.
>>>>> 
>>>>> Now, when creating annotations, the routing logic works fine. It routes
>>>>> Anntations properly.
>>>>> 
>>>>> But when I stop and restart Eclipse (with projects that contain multiple
>>>>> .ann files), I don¹t get the annotations... The files are there but the
>>>>> corresponding annotations don¹t appear in the Annotations Views.
>>>>> I¹ve set a break point in the routing logic expecting that the TAF would
>>>>> use
>>>>> that logic to figure what .ann files to read and load annotations but
>>>>> nothing.
>>>>> 
>>>>> So, this is letting me believe that there is something missing here. At
>>>>> start-up how does the TAF know what to load?
>>>>> 
>>>>> The weird thing is that, if I add new annotations on top of the existing
>>>>> ones, they get routed properly and added to the right .ann files, I see
>>>>> them
>>>>> in the UI but still can¹t see the ones created in the previous session.
>>>>> 
>>>>> Now, our routing requirements make it very dynamic. So you can¹t expect
>>>>> the
>>>>> TAF to ³remember² the files. It needs to get the URIs on-demand when an
>>>>> object is selected for all potential targets.
>>>>> This may require a change in the API.
>>>>> 
>>>>> Please let me know your thoughts on that.
>>>>> 
>>>>> Thanks,
>>>>> Eric 
>>>>> 
>>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> tigerstripe-dev mailing list
>>> tigerstripe-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/tigerstripe-dev
> 
> 



Back to the top