Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Customizing markers location with EMF Validation
Customizing markers location with EMF Validation [message #1736496] Wed, 29 June 2016 19:39 Go to next message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

Hi,

I have a Sirius modeller, based on an EMF model. So far, so good.
My EMF model comes with constraints that are handled through EMF validation. So, no validation defined in my *.odesign file.

When I validate a diagram, these constraints are correctly invoked.
However, the messy part occurs with the markers location. Indeed, my diagram's links are based on relations (i.e. EMF references), and not on elements. It means that when Sirius looks for an edit part to display the marker, it can pick up the node... or one of the edges whose source is this node. The underlying model element is the same for all of them.

And that's what happens.
When an element contains an error, the marker is not always associated with the DNode part. It is sometimes on an edge. And not always the same edge, depending on their configuration. This is far from being convenient for users.

Is there any way to customize or intercept the resolution of markers location? Or said differently, is there any way to force validation markers to only appear on nodes?

I took a look at the odesign options. I also digged into the code (the wrong location is found in the ValidateAction class). I also noticed we can write our own handler for org.eclipse.sirius.diagram.ui.command.validateDiagram. But that would be a crazy job... Any help would be appreciated.
Re: Customizing markers location with EMF Validation [message #1736541 is a reply to message #1736496] Thu, 30 June 2016 09:28 Go to previous messageGo to next message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

This is so weird.
I have not modified anything in my code. And this morning, all the edit parts are resolved correctly.
Markers are on my nodes and not on edges. I cannot explain this, because, again, I did not change anything (apart restarting my computer). Anyway, unless the problem arises again, I guess we can ignore my initial message.
Re: Customizing markers location with EMF Validation [message #1736570 is a reply to message #1736541] Thu, 30 June 2016 11:43 Go to previous messageGo to next message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

OK. I am spamming my own thread, but the issue is back. :/
Markers now appear on my edges while I would expect them to be shown on the node.
Re: Customizing markers location with EMF Validation [message #1736585 is a reply to message #1736570] Thu, 30 June 2016 13:05 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Vincent,


Le 30/06/2016 à 13:43, Vincent Zurczak a écrit :
> OK. I am spamming my own thread, but the issue is back. :/
> Markers now appear on my edges while I would expect them to be shown on
> the node.

When an edge has a mapping defined as "Relation" edge mapping, its
semantic element is the semantic element of its source.

Your issue really looks like a bug: it seems that EMF/GMF/Sirius takes
the first item it found with the good element to decorate and puts its
decorator. We should at least investigate to always have the same
behavior (node first or edge first or both) and maybe define another
approach to have a better solution.

Could you report a bug on the bugzilla [1] ?


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Customizing markers location with EMF Validation [message #1814128 is a reply to message #1736585] Wed, 04 September 2019 11:44 Go to previous message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
See also bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=540494
Previous Topic:Created Diagram programmatically - changes lost after closing diagram (redisplayed after restart)
Next Topic:Update decorators through service method
Goto Forum:
  


Current Time: Thu Apr 25 20:14:41 GMT 2024

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

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

Back to the top