Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » Problems during loading my own Profile in standalone mode
Problems during loading my own Profile in standalone mode [message #643841] Wed, 08 December 2010 13:29 Go to next message
dieppi is currently offline dieppi
Messages: 27
Registered: November 2010
Junior Member
Hi,

i created UML Model with MagicDraw and exported as EMF UML2.x. So now ich have my model file *.uml and 5 profile files.

During code generation, in standalone mode using acceleo 3.x, my datatypes (from MagicDraw Profile) and my stereotypes (from my own profile) are empty. After debuging is saw the following

org.eclipse.uml2.uml.internal.impl.DataTypeImpl@2016b0 (eProxyURI: UML_Standard_Profile.MagicDraw_Profile.profile.uml#eee_10454 67100323_249638_60)

Ok i now i need to register the magic draw profile files and my own profile file. But how can i do this?

I have a method public void registerResourceFactories(ResourceSet resourceSet). Here i registered the UML Standard profile and metamodel via

URIConverter.URI_MAP.put(URI
.createURI(UMLResource.LIBRARIES_PATHMAP), uri
.appendSegment("libraries").appendSegment(""));
// UMLResource.METAMODELS_PATHMAP=pathmap://UML_LIBRARIES/
URIConverter.URI_MAP.put(URI
.createURI(UMLResource.METAMODELS_PATHMAP), uri
.appendSegment("metamodels").appendSegment(""));
// UMLResource.PROFILES_PATHMAP=UMLResource.PROFILES_PATHMAP
URIConverter.URI_MAP.put(URI
.createURI(UMLResource.PROFILES_PATHMAP), uri
.appendSegment("profiles").appendSegment(""));

But how can i register the other profiles or my own profiles? The profiles are in the same directory as the model file. In eclipse UML Model editor the profiles shown as

platform:/resources/UML_Standard_Profile.MagicDraw_Profile.p rofile.uml



Best regards
Maik
Re: Problems during loading my own Profile in standalone mode [message #643853 is a reply to message #643841] Wed, 08 December 2010 13:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26125
Registered: July 2009
Senior Member
Maik,

Maik,

Did you load your model file using an absolute URI? If you're loading
from the file system, be sure to use java.io.File.getAbsolutePath before
converting it to a file URI.


Maik wrote:
> Hi,
>
> i created UML Model with MagicDraw and exported as EMF UML2.x. So now
> ich have my model file *.uml and 5 profile files.
>
> During code generation, in standalone mode using acceleo 3.x, my
> datatypes (from MagicDraw Profile) and my stereotypes (from my own
> profile) are empty. After debuging is saw the following
> mailto:org.eclipse.uml2.uml.internal.impl.DataTypeImpl@2016b0
> (eProxyURI:
> UML_Standard_Profile.MagicDraw_Profile.profile.uml#eee_10454
> 67100323_249638_60)
>
> Ok i now i need to register the magic draw profile files and my own
> profile file. But how can i do this?
>
> I have a method public void registerResourceFactories(ResourceSet
> resourceSet). Here i registered the UML Standard profile and metamodel
> via
>
> URIConverter.URI_MAP.put(URI
> .createURI(UMLResource.LIBRARIES_PATHMAP), uri
> .appendSegment("libraries").appendSegment(""));
> // UMLResource.METAMODELS_PATHMAP=pathmap://UML_LIBRARIES/
> URIConverter.URI_MAP.put(URI
> .createURI(UMLResource.METAMODELS_PATHMAP), uri
> .appendSegment("metamodels").appendSegment(""));
> // UMLResource.PROFILES_PATHMAP=UMLResource.PROFILES_PATHMAP
> URIConverter.URI_MAP.put(URI
> .createURI(UMLResource.PROFILES_PATHMAP), uri
> .appendSegment("profiles").appendSegment(""));
>
> But how can i register the other profiles or my own profiles? The
> profiles are in the same directory as the model file. In eclipse UML
> Model editor the profiles shown as
>
> platform:/resources/UML_Standard_Profile.MagicDraw_Profile.p rofile.uml
>
>
>
> Best regards
> Maik
Re: Problems during loading my own Profile in standalone mode [message #643858 is a reply to message #643853] Wed, 08 December 2010 13:59 Go to previous message
dieppi is currently offline dieppi
Messages: 27
Registered: November 2010
Junior Member
Ed you are the best. It works. Many thanks.......

Is use now

File model = new File(args[0]);
URI modelURI = URI.createFileURI(model.getAbsolutePath());


Maik
Previous Topic:[Xpand] Incremental generation does not work as expected
Next Topic:Using instances inside model from another model
Goto Forum:
  


Current Time: Mon Oct 20 09:46:40 GMT 2014

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

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