Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » static profil definition
static profil definition [message #476242] Fri, 28 September 2007 15:34 Go to next message
Eclipse UserFriend
Originally posted by: firstname.name.gmail.com

Hello,

I tried to create a static profile thanks to the short tutorial, given by James
Bruck in[1].

I succeeded in generating my editor from my uml profile and I have created the
extension (btw, the generated_package.exsd is missing and so it is not easy to
guess the attributes). My extension point is as follow:

<extension
point="org.eclipse.uml2.uml.generated_package">
<profile
uri="http://org.myfirm/MyProfile"
location=" /home/myHome/static.profile/MyStaticProfile.uml#_lvxGcG2hEdy -Dr8kHOSVhg "/>
</extension>

However when I start a new session and create a new UML model, I can't apply my
profile. It seems that the profile is not loaded. I looked at
org.eclipse.uml2.uml.editor.actions.ApplyProfileAction::run( ). I certainly
misunderstand something because I can't see how my static profile could be
loaded. The UML profile and ECORE profile is loaded explicitly.

I have no log errors.

Your help is much appreciated!

Reference(s):
[1] http://dev.eclipse.org/newslists/news.eclipse.modeling.mdt.u ml2/msg00817.html

--
F. Lagarde
Re: static profil definition [message #476246 is a reply to message #476242] Fri, 28 September 2007 17:16 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Francois,

Yes, sorry about that missing schema thing .. I will fix that in the next
build ( 2.2 M2 ).

You can work-around this by using the
UMLPlugin.getEPackageNsURIToProfileLocationMap().put(...) as mentioned.

1. Make sure you have the <<EPackage>> stereotype applied to your profile
with the nsURI set.

2. Make sure your code for your statically defined profile is in your
workspace so when you debug, the plugin will be launched. Your new
statically defined profile should have automatically generated extensions
(thanks to EMF) so that it makes its way into the ecore epackage registry
when launched.

Notice how UMLUtil.getDefinition() looks in the EPackage registry first,
only if the definition is not found in the epackage registry will it do the
"normal" profile lookup by looking in the annotation.


Let me know if that gets you further.

- James.


"Fran
Re: static profil definition [message #625058 is a reply to message #476242] Fri, 28 September 2007 17:16 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Francois,

Yes, sorry about that missing schema thing .. I will fix that in the next
build ( 2.2 M2 ).

You can work-around this by using the
UMLPlugin.getEPackageNsURIToProfileLocationMap().put(...) as mentioned.

1. Make sure you have the <<EPackage>> stereotype applied to your profile
with the nsURI set.

2. Make sure your code for your statically defined profile is in your
workspace so when you debug, the plugin will be launched. Your new
statically defined profile should have automatically generated extensions
(thanks to EMF) so that it makes its way into the ecore epackage registry
when launched.

Notice how UMLUtil.getDefinition() looks in the EPackage registry first,
only if the definition is not found in the epackage registry will it do the
"normal" profile lookup by looking in the annotation.


Let me know if that gets you further.

- James.


"Fran
Previous Topic:static profil definition
Next Topic:Property redefinitions
Goto Forum:
  


Current Time: Thu Apr 25 21:26:58 GMT 2024

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

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

Back to the top