Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Exceptions in UML Designer Development
Exceptions in UML Designer Development [message #1795173] Mon, 17 September 2018 17:25 Go to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi,

I'm trying to extend UML Designer using Sirius 6.0.1 on Eclipse Photon for my computer science master's thesis. I cloned the repository from Github, merged this pull request, and made some more dependency changes to get Sirius 6.0 compatibility.

I can launch the org.obeonetwork.dsl.uml2.navigator project as an Eclipse application and edit a project that I had created with UML Designer 8.0 on Eclipse Oxygen.

The problem is that when I'm in the Eclipse instance used for development (so not the Eclipse application launched using the org.obeonetwork.dsl.uml2.navigator project) and I create a new class diagram using "Create Representation", the diagram creation works fine, but once I add a new element to the diagram or import an element from my existing UML model, it always has the title "Invalid Feature as Name".

I checked the problems view and there I can see multiple entries of the following types:

Feature: labelExpression Exception while calling service org.obeonetwork.dsl.uml2.design.api.services.PackageHierarchyServices.computeUmlLabel(org.eclipse.uml2.uml.Element).

and
Feature: labelExpression An error has appeared during the evaluation of an expression:
Expression: aql:self.computeAssociationBeginLabel()
Diagnostic: Diagnostic ERROR source=org.eclipse.acceleo.query code=0 computeAssociationBeginLabel(org.eclipse.uml2.uml.Association) with arguments [org.eclipse.uml2.uml.internal.impl.AssociationImpl@2280e4 (name: insulinPumpStatesToBasalRates, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isDerived: false)] failed:
	null data=[org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException: computeAssociationBeginLabel(org.eclipse.uml2.uml.Association) with arguments [org.eclipse.uml2.uml.internal.impl.AssociationImpl@2280e4 (name: insulinPumpStatesToBasalRates, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isDerived: false)] failed:
	null]
Target URI Fragment: platform:/resource/HealthCareTest/model.uml#_ETsN0GaAEeiSn7XRQcELJw
Target: org.eclipse.uml2.uml.internal.impl.AssociationImpl@2280e4 (name: insulinPumpStatesToBasalRates, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isDerived: false)


What is the best way for debugging this problem? I found the method org.obeonetwork.dsl.uml2.design.api.services.PackageHierarchyServices.computeUmlLabel() in the source, but is there any way I can set a breakpoint there that is triggered during the use of Sirius?
Re: Exceptions in UML Designer Development [message #1795870 is a reply to message #1795173] Mon, 01 October 2018 14:38 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
I've cloned the Sirius git repository and launched an Eclipse debug instance using the org.eclipse.sirius.editor plugin project. Unfortunately the exception I described in my first post is caught within the Eclipse instance running Sirius, so I cannot easily figure out where in the Sirius code it occurs.

Does anybody have an idea how to debug this (e.g., set a breakpoint in the computeUmlLabel() method of UML Designer that is actually hit when developing with Sirius)?
Re: Exceptions in UML Designer Development [message #1795918 is a reply to message #1795173] Tue, 02 October 2018 12:15 Go to previous messageGo to next message
Frederic Bats is currently offline Frederic BatsFriend
Messages: 2
Registered: October 2018
Junior Member
Hello,
The last release of UML-Designer 8.1.1 is based on Eclipse Neon and sirius 5.1.2. In order to debug UML-designer you have to install a developper environement, has it is explained in the developper guide in UML-designer documentation.
Re: Exceptions in UML Designer Development [message #1795949 is a reply to message #1795918] Tue, 02 October 2018 17:30 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi,

Thank you for your response.

Does that mean that I have to use an Eclipse Neon installation with Sirius 5.1.2? Does it not work with newer versions?

I already read the guide for setting up a developer environment. I set up a development environment manually based on Eclipse Modeling Tools Photon with Sirius 6.0.2, Acceleo 3.7, and RCPTT IDE 2.3.0 and a few more dependencies. I also merged this pull request, and made some more dependency changes for Sirius 6.0 compatibility.
Re: Exceptions in UML Designer Development [message #1796159 is a reply to message #1795949] Sun, 07 October 2018 13:47 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi,

I tried setting up a development environment based on Eclipse Neon, but that didn't succeed, because one of UML Designer's projects has a dependency on org.eclipse.amalgam.explorer.activity.ui version 1.8 or higher and Eclipse Neon only has version 1.7 in its repositories.

So I set up a development environment based on Eclipse Modeling Tools Oxygen 3a, with Sirius 5.1.3, Acceleo 3.7.5, and some other dependencies. However, when I create e.g., a new class diagram and then add a class from my UML model to it, the class and all its members have the label "Invalid feature as name" and in the Eclipse Problems view I get the error:
Description    Resource    Path    Location    Type
Feature: labelExpression Exception while calling service org.obeonetwork.dsl.uml2.design.api.services.PackageHierarchyServices.computeUmlLabel(org.eclipse.uml2.uml.Element).    uml2.odesign    /org.obeonetwork.dsl.uml2.design/description    Unknown    Sirius Marker

When I hover over a class, the tooltip displays the correct package and class name.

How can I debug this error?
Re: Exceptions in UML Designer Development [message #1796224 is a reply to message #1796159] Mon, 08 October 2018 13:46 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Thomas,

You can put a breakpoint in PackageHierarchyServices.
Then launch a runtime in debug mode from your environment.
In the runtime import your project (or create a new one) and open/create a class diagram and try to add a Class.

Your breakpoint should be activated.

Regards,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Exceptions in UML Designer Development [message #1796228 is a reply to message #1796224] Mon, 08 October 2018 14:16 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi Maxime,

Thank you for your response. When I launch the org.obeonetwork.dsl.uml2.navigator plugin as an Eclipse application in debug mode, the breakpoint in the computeUmlLabel() method is hit, but in that case there is also no error.

Let's assume that I have an Eclipse instance A, which has the UML Editor source code projects open. When I launch a UML Editor plugin as an Eclipse application in debug mode, I get a new Eclipse instance B. The problem is that the error does not occur when editing a diagram with instance B, but when editing a diagram with instance A.

The way I understood it, Sirius should allow me to develop a modeling tool and test it right in the same Eclipse instance (A), without having to launch a new debug instance (B) every time I make a change. But in the case of UML Designer I get the error I mentioned in instance A.

Best regards,
Thomas
Re: Exceptions in UML Designer Development [message #1796565 is a reply to message #1796228] Tue, 16 October 2018 08:35 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member
Hi Thomas,

In developpement mode, you always have to use a runtime. Eclipse framework does not have the tools to load workspace plugins as if you launch a new runtime and override the same plugins already loaded from installation directory.
What is installed in your Eclipse and is loaded in instance A may not be what you have checkout in your workspace. That is why you can see differences generally.

Thought, Sirius have a button in toolbar to take in consideration the changes done in the design plugin in instance A. That avoids to restart the runtime for such modifications.

Once your developpement is finished you produce an update site usable in any Eclipse bundle or a complete product integrating it. This is classic Eclipse developpement lifecycle.

Focus on what happens in runtime and not in instance A.

Regards,

Pierre




Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Exceptions in UML Designer Development [message #1796879 is a reply to message #1796565] Sat, 20 October 2018 16:11 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi Pierre,

Thanks for your response. So I will test my changes in the runtime.

Just a final question: I couldn't find that toolbar button to take into consideration the changes in the design instance A. What is the name of the button? Maybe I can find it using the quick access commands textbox in the toolbar.

Best regards,
Thomas
Re: Exceptions in UML Designer Development [message #1796915 is a reply to message #1796879] Mon, 22 October 2018 09:17 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member
Hi,

The button is the following:

index.php/fa/34127/0/

Regards,

Pierre
  • Attachment: reloadVSM.png
    (Size: 14.82KB, Downloaded 182 times)


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

[Updated on: Mon, 22 October 2018 09:17]

Report message to a moderator

Re: Exceptions in UML Designer Development [message #1797155 is a reply to message #1796915] Fri, 26 October 2018 12:25 Go to previous message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi Pierre,

I checked the toolbar and used the Eclipse Quick Access search, but I couldn't find this command. Then I checked the Sirius website and found out that this feature was introduced with Sirius 6.0, but thanks anyway.

Best regards,
Thomas
Previous Topic:Show/hide column based on row selected in sirius table
Next Topic:How to populate the obeo model through the api?
Goto Forum:
  


Current Time: Sat Jan 23 04:14:29 GMT 2021

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

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

Back to the top