Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Validation plug-in does not use profile stereotype classes when validating model (Solved)
Validation plug-in does not use profile stereotype classes when validating model (Solved) [message #1851565] Fri, 08 April 2022 13:50 Go to next message
Kristian Harbo is currently offline Kristian HarboFriend
Messages: 3
Registered: April 2022
Junior Member
Hello there,

EDIT 2: I solved the problem. See my reply below.

I am making a validation plug-in (among others) for a Profile plug-in in "Eclipse Modeling Tools".
Inspiration has been taken from the "Library Profile Example" (see https://github.com/bmaggi/library-training).

I've gotten to the point where the UML profile, project wizard, diagram types, palettes, property view/tab, and java-based constraint-classes (+ selectors) all register in Papyrus.]

However, when validating a model with the profile and stereotypes applied to it, the stereotype classes (generated using a "genmodel"-file) are not used.

This image shows how I validate one "SoI" model object.

This image shows the implementation of an "IClientSelector" which prints the type of the object it is checking and whether the object has type "SoI" or not.
As you can see, the SoI class (which would be org.eclipse.papyrus.acs.profile.model.impl.SoIImpl) is not "used", however, as the highlighted text shows at the end, the "SoI" type is somewhat registered.
So, even though the SoI stereotype has been applied to the model object, the model object does not have the corresponding SoI class.

I've tried to mimic the Library Profile Example to the best of my abilities, but while the library example does use the generated classes for validation (see this image), my own profile does not.

Does anyone have a suggestion as to what I am missing? Some plugin/dependency or setting perhaps?
If you need more information, I'll be happy to provide it.

Note of interest: The Profile plug-in manifest file does export the packages containing the stereotype classes.

EDIT: Since the attached images are somehow not visible to me, I've uploaded the files to a Google Drive for good measure: "https://drive.google.com/drive/folders/16oJ_SMwiOl5ddFjKAtIUCLVHCAV5IIfN?usp=sharing".

Best regards and thank you,
Kristian Harbo

[Updated on: Sun, 10 April 2022 15:34]

Report message to a moderator

Re: Validation plug-in does not use profile stereotype classes when validating model [message #1851598 is a reply to message #1851565] Sun, 10 April 2022 15:32 Go to previous messageGo to next message
Kristian Harbo is currently offline Kristian HarboFriend
Messages: 3
Registered: April 2022
Junior Member
Hello again,

I've finally found the missing link. While this is not all that needs to be done in order for a profile to properly "register" in Papyrus, this part was very well hidden.

This image (also attached below) shows the general idea and is described further below:

1. In the "Project Explorer"-view, navigate to the file called something along the lines of "model.profile.uml" (located within your profile plug-in). Right-click the file and press "Open".
2. In the newly opened tree-view of the UML file, navigate to the object that represents your profile. Left-click on the object to select it.
3. In the "Properties"-view, fill in proper values on the fields "Base Package", "Ns Prefix", "Ns URI", "Package Name", and "Prefix" (refer also to the Library Profile Example for a more context-filled example).

I hope this will help someone in the future.

Best regards
Kristian Harbo

[Updated on: Sun, 10 April 2022 15:32]

Report message to a moderator

Re: Validation plug-in does not use profile stereotype classes when validating model [message #1851599 is a reply to message #1851598] Sun, 10 April 2022 15:44 Go to previous messageGo to next message
Edward Willink Too is currently offline Edward Willink TooFriend
Messages: 1
Registered: April 2022
Junior Member
Hi

Thanks for sharing your solution.

While it's fresh in your memory, you might care to raise a Papyrus documentation Bugzilla, ideally with revised text, to enable your discoveries to be visible where you expected them.

Regards

Ed Willink
Re: Validation plug-in does not use profile stereotype classes when validating model [message #1851609 is a reply to message #1851599] Mon, 11 April 2022 06:43 Go to previous messageGo to next message
Kristian Harbo is currently offline Kristian HarboFriend
Messages: 3
Registered: April 2022
Junior Member
Hi Ed

I'd love to post a Bugzilla, but I'm new here and unsure about where and how to do it. Is it on this webpage: "https://bugs.eclipse.org/bugs/enter_bug.cgi"?

However, since my problem/solution lies more with "Eclipse Modeling Tools" than "Papyrus", would this still be considered a Papyrus documentation Bugzilla, or would it perhaps be an Eclipse Modeling Tools documentation Bugzilla instead?

Best regards
Kristian Harbo
Re: Validation plug-in does not use profile stereotype classes when validating model [message #1851612 is a reply to message #1851609] Mon, 11 April 2022 07:43 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Certainly not an "Eclipse Modeling Tools" bug since everyone will just expect someone else to deal with it.

Surely it's either UML2 (the model) or Papyrus (the UI)?

Once you work out which file you would like edited it should be obvious which project owns it.

As with all projects their PMI page is a good start. The devoloper tab for Papyrus has a report bug button.

https://projects.eclipse.org/projects/modeling.mdt.papyrus/developer

Regards

Ed Willink
Previous Topic:uml state machine diagram - error action handle
Next Topic:Adding a Block under Package with Eclipse EMF programatically
Goto Forum:
  


Current Time: Fri Apr 19 04:15:42 GMT 2024

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

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

Back to the top