Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Edge Customization Smoothness
Edge Customization Smoothness [message #1723715] Wed, 17 February 2016 10:52 Go to next message
Frank Sorek is currently offline Frank SorekFriend
Messages: 22
Registered: February 2016
Junior Member
Hi everyone,

1. Is there a possibillty to customize the appearance of edges, so that they are automatically smooth?

I know in the diagram view, I can set the Smoothness of edges to None, Normal, Less or More. Can I change the default value from None to Normal in my odesign File?

2. Is there a way to disable the workability of an edge? I don't want, that someone can move the bend-points.


3. If I want to have 2 edges for a bidirectional connection, do I have to define 2 edges in my odesign File and how can I bind these edges together so when I click on one of them that both edges are selected, like in this picture:
index.php/fa/25011/0/
This is also the edge I asked in my second question.

Regards,
Frank
Re: Edge Customization Smoothness [message #1724698 is a reply to message #1723715] Thu, 25 February 2016 13:40 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Frank,

See my comments below:

On 02/17/2016 08:48 PM, Frank Sorek wrote:
> Hi everyone,
>
> 1. Is there a possibillty to customize the appearance of edges, so that they are automatically smooth?
>
> I know in the diagram view, I can set the Smoothness of edges to None, Normal, Less or More. Can I change the default value from None to Normal in my odesign File?
This appearance parameter cannot be customized using in the odesign
file. A possible solution would be adding your own
org.eclipse.sirius.business.api.session.ModelChangeTrigger in the
org.eclipse.sirius.business.api.session.SessionEventBroker. If a new GMF
edge is created, the ModelChangeTrigger will be notified and that let
the opportunity to change its appearance. The SessionEventBroker can be
retrieved from the Sirius session
(org.eclipse.sirius.business.api.session.Session). You will find various
examples in the Sirius source code. The sessionEvenBroker is registered
as a pre-commit listener, that means the ModelChangeTrigger will be
notified in pre-commit of the EMF transaction.
>
> 2. Is there a way to disable the workability of an edge? I don't want, that someone can move the bend-points.
>
There is nothing in Sirius to do this easily. It's possible deactivate
the corresponding editPart
(org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart.deactivate()).
The edge will remain visible but the end-user will not be able to modify
it at all (that also means the edge appearance).

>
> 3. If I want to have 2 edges for a bidirectional connection, do I have to define 2 edges in my odesign File and how can I bind these edges together so when I click on one of them that both edges are selected, like in this picture:
>
> This is also the edge I asked in my second question.

That will also ask to provide your own mechanism, probably a custom
edgeEditPart etc.
>
> Regards,
> Frank
>

Regards,

--
Florian - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Registering New Diagram Extensions
Next Topic:Can man edit DDiagram programmatically?
Goto Forum:
  


Current Time: Thu Apr 25 12:49:41 GMT 2024

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

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

Back to the top