Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problems with profile "file:" URI in UML Model Editor
Problems with profile "file:" URI in UML Model Editor [message #626177] Tue, 11 March 2008 12:48
Eclipse UserFriend
Originally posted by:


I'm working on an Eclipse "translator" plugin project that will take a model
encapsulated in a custom Microsoft Access DB and translate it into a UML2
model in Eclipse. The plugin loads a custom profile programmatically,
creates the model and all the elements (applying stereotypes and setting
tagged values from the profile as appropriate), and finally saves the model
to the designated folder in the workspace. The final model can then be
viewed in Eclipse using the UML Model Editor or similar.

All of that is working perfectly well so far. The problem I am having is
occurring when I try to change the URI scheme by which I locate the profile.
By default, the plugin accesses the profile using a "platform:/" URI
(profiles for the translator are stored within their own plugin). I would
like to have an alternative option to use a "file:/" URI to locate the
profile, because the output model is sometimes loaded into an external UML
editor (VP-UML, to be specific) and of course the "platform:" URI doesn't
mean anything to that tool. (The model loads fine in the external editor,
but because the original profile file is not accessible, certain aspects of
the stereotype definition are not loaded. I have been working with Visual
Paradigm to clarify the requirements.)

I can get the "file:" URI for the profile's location, and when I pass it to
the translator, it works just fine-- the profile can be loaded from that URI
and applied to the model. The problem occurs when I then try to open the
model in the UML Model Editor in Eclipse: when the model is opened/expanded,
I get an "Error" message. The problem is that the "href" for the profile is
getting saved incorrectly, as evidenced by the following:

<profileApplication xmi:id="_rEJLLe9oEdyqitgWLuaR9g">
<eAnnotations xmi:id="_rEJLLu9oEdyqitgWLuaR9g"
<references xmi:type="ecore:EPackage"
href=" ../../../../../../../../eclipseNew/eclipse/configuration/org .eclipse.osgi/bundles/614/1/.cp/profiles/NAS.profile.uml#_XD N8YbTEEdyfbZc0xZIVvQ "/>
href=" ../../../../../../../../eclipseNew/eclipse/configuration/org .eclipse.osgi/bundles/614/1/.cp/profiles/NAS.profile.uml#_0 "/>

As you can see from the "../../../../../..", the URIs are getting garbled
when the profile URI is stored in the model.

Any thoughts or suggestions on what may be going wrong and how to avoid it
would be greatly appreciated. I am not that knowledgeable about URL/URI
handling in Eclipse and I may well be doing something wrong. I'll be happy
to provide further information or code snippets on request.
Previous Topic:part's multiplicity
Next Topic:part's multiplicity
Goto Forum:

Current Time: Fri Oct 07 20:13:16 GMT 2022

Powered by FUDForum. Page generated in 0.01788 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top