Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to use the OCL Evaluation panel
How to use the OCL Evaluation panel [message #1843213] Tue, 20 July 2021 11:50 Go to next message
David D is currently offline David DFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I'm just getting started with Papyrus (Version: 2020-12 (4.18)). I have defined a project with a UML profile and a project with a UML model using this profile. I'm now trying to write some OCL constraints and I'm having a really hard time doing so. There is the "OCL Evaluation" panel that I presume could help me in this task, but it remains desperately blank and not editable. I searched the internet for some documentation but found none. How can I easily test my constraints (written in the model, not in a separate OCL file)?

Best regards,
David
Re: How to use the OCL Evaluation panel [message #1843224 is a reply to message #1843213] Tue, 20 July 2021 15:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I've very little idea what the OCL evaluation panel is. Perhaps it is something to do with Acceleo / Sirius. Can you explain where you found it and what made you try to use it?

Papyrus uses the Xtext/Pivot-based variant of Eclipse OCL for which you can use the Interactive Xtext Console. You may find it worth glancing at the OclUInEcore tutorial and following the Complete OCL tutorial to get the hang of playing with OCL. You can cut and paste from Complete OCL to Papyrus Constraints of you like embedding otherwise you can just load the Complete OCL document into Papyrus.

Regards

Ed Willink
Re: How to use the OCL Evaluation panel [message #1843225 is a reply to message #1843224] Tue, 20 July 2021 16:21 Go to previous messageGo to next message
David D is currently offline David DFriend
Messages: 4
Registered: July 2009
Junior Member
I indeed installed Acceleo inside the Papyrus distribution but the icon in the OCL evaluation panel is the Papyrus one so I thought that was a Papyrus feature. After reading your answer I launched a clean Papyrus installation with a new workspace and this view is still here under Papyrus (Window > Show view > Others).

I just found the Interactive Xtext OCL Console and tried it but I got "Failed to launch OCL debugger No launch delegate found - launch canceled".

As a side note, I have to say that I'm overwhelmed by the complexity of the Eclipse/Papyrus/EMF/XXX ecosystem and the difficulty to find simple documentation. I'm no UML expert but I've used MagicDraw for quite some time to model complex systems. Maybe I haven't found the right documentation.
Re: How to use the OCL Evaluation panel [message #1843227 is a reply to message #1843225] Tue, 20 July 2021 19:15 Go to previous messageGo to next message
David D is currently offline David DFriend
Messages: 4
Registered: July 2009
Junior Member
That's what I did:

- Download, extract and launch "papyrus-2020-12-5.0.0-linux64.tar.gz"
- Create a new workspace
- New Papyrus project
--- Architecture context = UML
--- Project name = test
--- Model file name = test
--- Representation kind = Class diagram
- Create a class "MyClass"
- Open the "General > Console" view
- Choose the "Interactive Xtext OCL" console type
- Type "self" in the console
- Select the class MyClass
- Click debug button in the console
- Got a dialog with "Failed to launch OCL debugger No launch delegate found - launch canceled"

Re: How to use the OCL Evaluation panel [message #1843234 is a reply to message #1843227] Wed, 21 July 2021 06:30 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The debugger is a last not first resort and you should follow the debugger tutorial before attempting it to ensure that you register a Debug delegate. The Interactive Xtext Console allows you to just select-self, type-expression and run.

Lunching a debugger for OCL is much harder than for e.g. Java since you have already started a non-debug application such as Papyrus and then need to ensure that a debugger is started as required.

The many collaborating projects at Eclipse is one of its strengths but also one of its weaknesses. The individual components often work well but when integrated together in a larger application such as Papyrus there are at least some rough edges and often a few gaps as well.. Resolving these issues can be difficult when each of the component development groups have competing priorities and close to zero funding.

Regards

Ed Willink
Previous Topic:Errors generated when adding code on the C/C++ "Pre Body" field while CDT Editor opened
Next Topic:Cannot simulate parameter graph using moka plugin
Goto Forum:
  


Current Time: Fri Apr 19 14:07:42 GMT 2024

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

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

Back to the top