Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Importing UML profile in an Architecture model
Importing UML profile in an Architecture model [message #1799247] Mon, 03 December 2018 13:26 Go to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi there,

We are trying to create an Architecture model in Papyrus Photon for a customised viewpoint.

I am a bit confused on how one should import an UML profile into the Description language of a Domian.

I have with me a simple uml profile (let's call it simple.profile.uml), when I do a load resource, I cannot locate the Profile in the Description language. Did I do anything wrong? What is the specific steps that I need to follow to refer to an UML profile?

Cheers,
Ran Wei


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1799671 is a reply to message #1799247] Wed, 12 December 2018 08:17 Go to previous messageGo to next message
Nicolas FAUVERGUE is currently offline Nicolas FAUVERGUEFriend
Messages: 47
Registered: February 2014
Member
Hi,

The profile is not a really important thing in your architecture. The most important about your profile in your architecture is the element types and the creation command class.

Indeed, when your defined your element types, you must applied your stereotype to your UML element to create if needed (ask me if you want more informations).

If you want to apply automatically the profile into your created model, you must create your own "Creation command class" specified in the architecture (in the language).

Your class will contains something like that :

protected void initializeModel(final EObject owner) {
	super.initializeModel(owner);
	Package packageOwner = (Package) owner;

	// Retrieve profile
	Profile profile= (Profile) PackageUtil.loadPackage(URI.createURI("MyProfilePathIntoPlugin"), owner.eResource().getResourceSet());
	if (null != profile) {
		PackageUtil.applyProfile(packageOwner, profile, true);
	}
 }


HTH,
Nicolas
Re: Importing UML profile in an Architecture model [message #1799687 is a reply to message #1799671] Wed, 12 December 2018 12:00 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi Nicholas,

Thank you very much for your response!

The architecture model has got me confused for quite some time. Here's what I have so far:

1) I have defined a simple UML Profile, and created corresponding genmodel, model code, and declared the generated package in plugin.xml. My question with regard to this is: is generating the model code necessary in order to create a customised editor?

2) I have created an architecture model, and load the UML profile in the description language, I have the .typesetconfiguration file generated by Papyrus from my UML profile, and reference it in the architecture model. I have also defined a palette model and referenced it in the architecture model. I have also registered the architecture model in the extension point.

3) I have also created a model creation command, and register the UML profile programmatically like you showed me above.

4) I am able to start a new Eclipse instance, and create a model using my defined architecture model (view point). The model gets created successfully (no exceptions, I am able to see that the profile is applied to the model), but I am unable to create model elements from my defined palette.

I suspected that there may be something wrong with the element types configuration. Could you please may be say a bit more about this?

Thank you very much.

Ran


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1799694 is a reply to message #1799687] Wed, 12 December 2018 14:00 Go to previous messageGo to next message
Nicolas FAUVERGUE is currently offline Nicolas FAUVERGUEFriend
Messages: 47
Registered: February 2014
Member
Hi,

To answer about your first question (My question with regard to this is: is generating the model code necessary in order to create a customised editor?) : Yes you need it to create element from the EMF framework (The element types manage it)

Concerning the problem you get :
1) Did the created model have the profile applied ? If not, take a look about your creation command class.

2) Do you have elementtypes defined for semantic and for graphical elements ? If not, i guess it will be the problem. You will define semantic element types inherited UML semantic element types and you will define graphical elements inherited UML graphical elements AND your semantis elements. If you have some problems about that, i can show you a simple example to explain that.

3) If you have correctly defined your element types, did the palette reference the graphical element types ?

You can watch if you are able to select your palette configuration with the 'Customize...' menu item in the palette.

HTH,
Nicolas
Re: Importing UML profile in an Architecture model [message #1800174 is a reply to message #1799694] Thu, 20 December 2018 21:46 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi Nicolas,

Thanks very much for your response, and apologies for not being able to reply to you sooner.

With regard to your last post:

Quote:

1) Did the created model have the profile applied ? If not, take a look about your creation command class.


Yes the created model have the profile applied.


Quote:

2) Do you have elementtypes defined for semantic and for graphical elements ? If not, i guess it will be the problem. You will define semantic element types inherited UML semantic element types and you will define graphical elements inherited UML graphical elements AND your semantis elements. If you have some problems about that, i can show you a simple example to explain that.


I have defined semantic element types inherited from UML, the graphical elements are the ones that confuse me, it would be great if you could provide a n example on this.

Quote:

3) If you have correctly defined your element types, did the palette reference the graphical element types ?

I referenced the palette definition in the .architecture model, so when a new Eclipse starts up, the viewpoint is there (with the palette).

I am wondering, if you could explain a little bit about the organisations of models in plug-ins? As much as I understood, the profile should be in one plug-in, then another plug-in for elementtypesconfiguration, and then another plug-in for the .architecture model and the palette. If this is the case, then please let me know

1) Do I need to generate the code (also the ecore metamodel) for the profile (i.e. the static profile)?
2) How to reference to the profile in other plugins without starting a new Eclipse instance?
3) How to reference to the elementtypesconfiguration from the architecture model without starting a new Eclipse instance?

Thank you very much for your kind help, it is much appreciated.

Cheers!
Will


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1800362 is a reply to message #1799694] Wed, 26 December 2018 00:59 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi Nicolas,

Any ideas on this matter, please?

Cheers,
Ran


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1800721 is a reply to message #1800362] Mon, 07 January 2019 09:36 Go to previous messageGo to next message
Nicolas FAUVERGUE is currently offline Nicolas FAUVERGUEFriend
Messages: 47
Registered: February 2014
Member
Hi,

I think your problem comes from the graphical element types.
For example, i will show you the class elements types for example :

1) We create a class element type ('UML::Class')
2) We create some graphical element types inherit from the previous metamodel element type ('UML::Class') named 'Class_Shape' and 'Class_Shape_CN'

But for your case, if you just manage stereotypes (as i supposed), you have do these steps:
1) Create your Specialization of your Profile element inherit from the UML metamodel element. For example, if i manage a stereotype on class, i will have this one:
<elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="my.identifier.exampleStereotype" identifier="my.identifier.exampleStereotype" name="ExampleStereotype" hint="UML::Class" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <iconEntry xmi:type="elementtypesconfigurations:IconEntry" xmi:id="_R-jZsIkOEeiS4samNlCtPg" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
    <matcherConfiguration xmi:type="stereotypematcher:StereotypeApplicationMatcherConfiguration" xmi:id="_Utj9oIkOEeiS4samNlCtPg" profileUri="http://www.profileuri.com">
      <stereotypesQualifiedNames>ExampleProfile::ExampleStereotype</stereotypesQualifiedNames>
    </matcherConfiguration>
    <specializedTypes xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
  </elementTypeConfigurations>


2) After you have to create your own graphical element types depending to this element type created. To continue this example:
<elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="my.identifier.di.exampleStereotype_Class_Shape" identifier="my.identifier.di.exampleStereotype_Class_Shape" name="Example Stereotype (Class_Shape)" hint="Class_Shape" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <iconEntry xmi:type="elementtypesconfigurations:IconEntry" xmi:id="_gjTvQYmgEeiS4samNlCtPg" iconPath="/icons/full/obj16/ExampleStereotype.gif" bundleId="my.plugin.profile.edit"/>
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/my.plugin.types/models/example.elementtypesconfigurations#my.identifier.exampleStereotype"/>
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Class_Shape"/>
  </elementTypeConfigurations>


3) You have to link your palette element to this graphical element type.

I hope this example helps you for element types.

Concerning the architecture of our plugins, we got this type:
1) We have a plugin for the architecture named 'my.plugin.architecture'
2) We have 2 plugins for profile 'my.plugin.profile' and 'my.plugin.profile.edit'
3) We have a plugin with element types 'my.plugin.types'
4) We have a plugin for the diagram and palette 'my.plugin.class.diagram'

Finally, to answer to your questions :

Quote:
1) Do I need to generate the code (also the ecore metamodel) for the profile (i.e. the static profile)?


If you need to manage some dedicated actions while coding, it's better for you to generate the code.

Quote:
2) How to reference to the profile in other plugins without starting a new Eclipse instance?


You can reference the profile in your same eclipse instance but you won't have the palette, diagrams, etc. from your plugins. Take care to the URI of your profile (you will have a local URI (something like '../../../test.uml#id' instead of 'platform:/my.plugin.profile/test.uml#id')

Quote:
3) How to reference to the elementtypesconfiguration from the architecture model without starting a new Eclipse instance?


You cannot reference it. Your only way to manage it is the export of your plugins into your eclipse instance (like Eclipse plugins)

HTH,
Nicolas
Re: Importing UML profile in an Architecture model [message #1801754 is a reply to message #1800721] Fri, 25 January 2019 16:29 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hello Nicolas,

I am interested in this topic as I'm facing the same scenario as described by the OP.
Unfortunately they have not replied to your latest post yet, so it is not clear if they managed to solve the issue or not.

Basically I'd like to create stereotyped elements from the palette.
I've tried to develop a minimal profile and architecture following this very useful discussion, but at the end it seems i'm missing something: I can create the element from the palette, but without name (minor issue) and, more importantly, without the stereotype!
Maybe there could still be something wrong with the graphical elements?

I've attached the sample profile and architecture to reproduce the behavior.
It would be of great help if you, or anyone else, is willing to have a look at them and tell me if there is something wrong or missing.

Kind Regards,
Nicholas
Re: Importing UML profile in an Architecture model [message #1801783 is a reply to message #1800721] Sat, 26 January 2019 18:44 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi Nicolas,

After so many attempts, I have managed to create a working UML profile editor, with stereotypes that extend UML::Dependency. Thanks very much for your advice!

However, when I move on to creating stereotypes that extend UML::Association I ran into problems. Somehow Papyrus was not able to locate the stereotype for the edges, any idea why this may be the case?

Cheers!
Will


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1801784 is a reply to message #1801754] Sat, 26 January 2019 18:50 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hello Nicholas,

I believe the following change to your elementtypesconfiguration should solve your problem:

<?xml version="1.0" encoding="UTF-8"?>
<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:applystereotypeadvice="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:stereotypematcher="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1" xmi:id="org.example.sampleProfile.elementTypes" identifier="org.example.sampleProfile.elementTypes" name="SampleProfile" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
  <elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.example.sampleProfile.SampleSystem" identifier="org.example.sampleProfile.SampleSystem" name="SampleSystem" hint="UML::Class" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <iconEntry xmi:type="elementtypesconfigurations:IconEntry" xmi:id="_UTWX8iCaEemeGsPzIEbgXQ" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
    <matcherConfiguration xmi:type="stereotypematcher:StereotypeApplicationMatcherConfiguration" xmi:id="_UTWX8yCaEemeGsPzIEbgXQ" profileUri="http://org.example.profile/SampleProfile">
      <stereotypesQualifiedNames>SampleProfile::SampleSystem</stereotypesQualifiedNames>
    </matcherConfiguration>
    <specializedTypes xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
  </elementTypeConfigurations>
  <elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_hxW3gCGSEemwT888A0Ae8Q" identifier="org.example.sampleProfile.SampleSystem.shape" name="Sample System Shape" hint="Class_Shape" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.example.architecture/resources/sampleprofile.elementtypesconfigurations#org.example.sampleProfile.SampleSystem"/>
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Class_Shape"/>
  </elementTypeConfigurations>
  <adviceBindingsConfigurations xmi:type="applystereotypeadvice:ApplyStereotypeAdviceConfiguration" xmi:id="_UTWX9CCaEemeGsPzIEbgXQ" description="Apply Stereotype SampleSystem" identifier="org.example.sampleProfile.sampleSystem" target="org.example.sampleProfile.SampleSystem">
    <stereotypesToApply xmi:type="applystereotypeadvice:StereotypeToApply" xmi:id="_UTWX9SCaEemeGsPzIEbgXQ" stereotypeQualifiedName="SampleProfile::SampleSystem" updateName="true">
      <requiredProfiles>SampleProfile</requiredProfiles>
    </stereotypesToApply>
  </adviceBindingsConfigurations>
</elementtypesconfigurations:ElementTypeSetConfiguration>



Cheers!
Will


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1801801 is a reply to message #1801784] Sun, 27 January 2019 06:42 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi,

OK I have fixed my example with stereotypes that extend UML::Association - the semantic element to extend turns out to be UML::AssociationBase (used UML::Association before and did not work).

Thanks very much Nicolas for your kind help. Much appreciated!

Cheers,
Will


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1801803 is a reply to message #1801801] Sun, 27 January 2019 08:50 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

A stereotype extending UML::AssociationBase seems very very unlikely. I see no AssociationBase in the UML 2.5 specification document. I see no "Base" suffixing policy in UML 2.5. I see no AssociationBase in any file in the org.eclipse.uml2.uml plugin. Googling UML AssociationBase finds org.eclipse.papyrus.uml.AssociationBase . It would appear that you (or Papyrus) are getting confused between the UML Association class and a Papyrus AssociationBase editing facility; platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.AssociationBase If you really are working with a Papyrus UML editing model, I strongly recommend using some package name other than UML.

Regards

Ed Willink
Re: Importing UML profile in an Architecture model [message #1801805 is a reply to message #1801803] Sun, 27 January 2019 13:51 Go to previous messageGo to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 111
Registered: September 2012
Location: York, UK
Senior Member
Hi,

The following elementtypesconfigurations is used (same as you found from Google)

platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.AssociationBase

I would assume that Papyrus uses somewhat wrapping mechanisms for semantic elements, and then relate to UML semantic elements at runtime.

Need clarifications though, hopefully Nicolas would help answer this question.

Cheers!
Will


Research Associate
Department of Computer Science
University of York
Re: Importing UML profile in an Architecture model [message #1801850 is a reply to message #1801784] Mon, 28 January 2019 12:20 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hi Will,

thank you very much for your help! I think I now understand how to deal with elementtypesconfiguration models a bit more.

hopefully, I will be able to model the whole real profile now.

thanks again!

Regards,
Nicholas

Ran Wei wrote on Sat, 26 January 2019 13:50
Hello Nicholas,

I believe the following change to your elementtypesconfiguration should solve your problem:

<?xml version="1.0" encoding="UTF-8"?>
<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:applystereotypeadvice="http://www.eclipse.org/papyrus/uml/types/applystereotypeadvice/1.1" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:stereotypematcher="http://www.eclipse.org/papyrus/uml/types/stereotypematcher/1.1" xmi:id="org.example.sampleProfile.elementTypes" identifier="org.example.sampleProfile.elementTypes" name="SampleProfile" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
  <elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.example.sampleProfile.SampleSystem" identifier="org.example.sampleProfile.SampleSystem" name="SampleSystem" hint="UML::Class" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <iconEntry xmi:type="elementtypesconfigurations:IconEntry" xmi:id="_UTWX8iCaEemeGsPzIEbgXQ" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
    <matcherConfiguration xmi:type="stereotypematcher:StereotypeApplicationMatcherConfiguration" xmi:id="_UTWX8yCaEemeGsPzIEbgXQ" profileUri="http://org.example.profile/SampleProfile">
      <stereotypesQualifiedNames>SampleProfile::SampleSystem</stereotypesQualifiedNames>
    </matcherConfiguration>
    <specializedTypes xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
  </elementTypeConfigurations>
  <elementTypeConfigurations xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_hxW3gCGSEemwT888A0Ae8Q" identifier="org.example.sampleProfile.SampleSystem.shape" name="Sample System Shape" hint="Class_Shape" kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.example.architecture/resources/sampleprofile.elementtypesconfigurations#org.example.sampleProfile.SampleSystem"/>
    <specializedTypes xmi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Class_Shape"/>
  </elementTypeConfigurations>
  <adviceBindingsConfigurations xmi:type="applystereotypeadvice:ApplyStereotypeAdviceConfiguration" xmi:id="_UTWX9CCaEemeGsPzIEbgXQ" description="Apply Stereotype SampleSystem" identifier="org.example.sampleProfile.sampleSystem" target="org.example.sampleProfile.SampleSystem">
    <stereotypesToApply xmi:type="applystereotypeadvice:StereotypeToApply" xmi:id="_UTWX9SCaEemeGsPzIEbgXQ" stereotypeQualifiedName="SampleProfile::SampleSystem" updateName="true">
      <requiredProfiles>SampleProfile</requiredProfiles>
    </stereotypesToApply>
  </adviceBindingsConfigurations>
</elementtypesconfigurations:ElementTypeSetConfiguration>



Cheers!
Will

Re: Importing UML profile in an Architecture model [message #1804546 is a reply to message #1801754] Thu, 28 March 2019 15:17 Go to previous messageGo to next message
Simon Kuzin is currently offline Simon KuzinFriend
Messages: 18
Registered: February 2019
Location: Singapore
Junior Member
Nicholas Pacini wrote on Fri, 25 January 2019 16:29
Hello Nicolas,

....
Basically I'd like to create stereotyped elements from the palette.
I've tried to develop a minimal profile and architecture following this very useful discussion, but at the end it seems i'm missing something: I can create the element from the palette, but without name (minor issue) and, more importantly, without the stereotype!
....


Having the same issue. How did you manage to resolve it?
Re: Importing UML profile in an Architecture model [message #1804547 is a reply to message #1804546] Thu, 28 March 2019 15:39 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hello Simon,

I've made a bit of progress about this work, but I've not fully solved it.

Currently I'm looking at the available SysML palettes and I'm trying to replicate the same Element Types configuration for my Stereotypes (when applicable).
Of course this method has some shortcomings, for instance I'm not able to create elements with a Stereotype that extends UML::Constraint, because there is no SysML Stereotype that extends it!

I can share the (updated) sample profile and architecture which consists of:

org.example.architecture - which contains the architecture, the elementtypes definitions and the palette definition
org.example.profile - which is the static profile that defines the sample stereotypes.

In particular, regarding the palette definition, I have defined four ToolConfiguration to create as many stereotyped elements . The one that extends Constraint (Criticality Level) is not working, the other three seem fine.

I hope it can be of help...
...and maybe you or someone else will find the solution!

Regards,
Nicholas
Re: Importing UML profile in an Architecture model [message #1804549 is a reply to message #1804547] Thu, 28 March 2019 16:19 Go to previous messageGo to next message
Simon Kuzin is currently offline Simon KuzinFriend
Messages: 18
Registered: February 2019
Location: Singapore
Junior Member
Thanks Nicholas.
Let me compare your typedefs with mine. Will keep you posted on my progress
Re: Importing UML profile in an Architecture model [message #1804552 is a reply to message #1804549] Thu, 28 March 2019 16:49 Go to previous messageGo to next message
Simon Kuzin is currently offline Simon KuzinFriend
Messages: 18
Registered: February 2019
Location: Singapore
Junior Member
Hi Nicholas.
Unfortunately initial test failed.

I did following:
1. Took 4 files from your workspace
a. model.profile
b. sampleprofile.elementtypesconfigurations
c. sampleprofileDI.elementtypesconfigurations
d. samplediagram.paletteconfiguration
2. Deployed type configurations and palette , using context menu "Deploy xxxx" in project explorer.
3. Created empty model , with application of your SampleProfile
4. Created empty class diagram

Your "Sample" palette appears in class diagram palette section. I'm able to use "SampleSystem" tool. But the tool creates Class , without applying "Sample System" stereotype.
Exactly as in my own DSML prototype.

Your type configurations and palette are 100% identical to mine.

Did you manage to get your "SampleSystem" tool applying a proper stereotype ?
Re: Importing UML profile in an Architecture model [message #1804556 is a reply to message #1804552] Thu, 28 March 2019 17:21 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hi Simon,

I simply have those two plugins in a workspace and I launch a new runtime Eclipse application to test them:

In this new runtime Eclipse I create a new Papyrus Project using the wizard and selecting the "Sample Language" architectural context.

Then I create a new "Sample Diagram" on the (empty) model.

At this point I see the custom palette. As I said before, the only tool configuration not working is "CriticalityLevel": it just creates a Constraint. The other Tools (including "SampleSystem") work properly in my environment.
Re: Importing UML profile in an Architecture model [message #1804557 is a reply to message #1804556] Thu, 28 March 2019 17:27 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
As I side note, I'm also keeping an eye on this topic: https://www.eclipse.org/forums/index.php/t/1097976/
Hopefully we can get a tool to migrate the old xml palette definition to the new Architectural Framework (I don't know if this is your case).
Re: Importing UML profile in an Architecture model [message #1804562 is a reply to message #1804557] Thu, 28 March 2019 18:01 Go to previous messageGo to next message
Simon Kuzin is currently offline Simon KuzinFriend
Messages: 18
Registered: February 2019
Location: Singapore
Junior Member
Thanks Nicholas,
I've made your workspace working this way. You really made my day :)

I was trying to make a "quick and dirty" prototype, without packaging the typedefs into a plugin. Obviously it doesn't work this way.
Thanks for pointing me to to the palette topic. Yep it's my case as well. Final goal of my exercises is to migrate Archimate DSML to Photon.
Without palette migration tool i would have to re-define tools for all 56 language elements manually.

[Updated on: Thu, 28 March 2019 18:01]

Report message to a moderator

Re: Importing UML profile in an Architecture model [message #1804809 is a reply to message #1804562] Mon, 01 April 2019 14:55 Go to previous messageGo to next message
Simon Kuzin is currently offline Simon KuzinFriend
Messages: 18
Registered: February 2019
Location: Singapore
Junior Member
Hi Nicholas,

I've got a chance to look at your profile definition in more details.
The matter is simple.
For constraints on UML Class Diagram you should specialise Constraint Packaged Element Shape (Hint:Constraint_PackagedElementShape) , not Constraint Shape, in your notation type defs.
You can figure it out looking at log of TypesConfigurations Listener. Just try to put constraint into standard Class diagram and see advices for which element types are getting approved.

index.php/fa/35180/0/

One more hint. You may get rid of static profile modelgen hassle and just use dynamic profiles. Just define org.eclipse.uml2.uml.dynamic_package extension instead of org.eclipse.uml2.uml.generated_package.

Sample plugin attached.
Re: Importing UML profile in an Architecture model [message #1805283 is a reply to message #1804809] Thu, 11 April 2019 08:02 Go to previous message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hi Simon,

thanks a lot for your reply... very helpful!

BR
Nicholas
Previous Topic:Property as a border item
Next Topic:Generating ArrayList, Getters, Setters and public constructors in Java
Goto Forum:
  


Current Time: Thu Dec 12 00:11:17 GMT 2019

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

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

Back to the top