|[tigerstripe-dev] 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
Back to the top