Questions about diagram elements arrangements and custom appearance [message #1716560] |
Fri, 04 December 2015 19:54 |
Parsa Pourali Messages: 210 Registered: February 2014 |
Senior Member |
|
|
Hi,
I have three questions and I appreciate if somebody could answer it:
1: Can we have a custom edge style such as the one shown in the figure below, like the empty circle and the filled circle at the end of an edge? These are not defined in the predefined Sirius edge decorators.
2: When I create a representation, I create the root semantic element at the same time. Sirius initially puts the element representation (which is a node) to somewhere in the canvas. Can I force it to put the node element in a place that I want, for example insert the node on the canvas at 100 px,100 px or at the top-left corner ...
3: I am trying to put an icon for an Operation Action (menu item). It does not show the icon , is there anything specific about the icon extension or size ? I used jpeg, png, .ico files but no luck!
Thanks,
Bests,
Parsa
[Updated on: Fri, 04 December 2015 22:17] Report message to a moderator
|
|
|
|
|
|
Re: Questions about diagram elements arrangements and custom appearance [message #1718613 is a reply to message #1716560] |
Mon, 28 December 2015 10:20 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Le 04/12/2015 20:54, Parsa Pourali a écrit :
> Hi,
>
> I have two short questions:
>
> 1: Can we have a custom edge style such as the one shown in the figure below, like the empty circle and the filled circle at the end of an edge? These are not defined in the predefined Sirius edge decorators.
>
>
> 2: When I create a representation, I create the root semantic element at the same time. Sirius take the element representation (which is a node) to somewhere in the canvas. Can I force it to put the node element in a place that I want, for example insert the node on the canvas at 100 px,100 px or at the top-left corner ...
>
> Thanks,
> Bests,
> Parsa
>
Hi,
1. Currently there is no easy way to customize edge anchor decorator. As
said by Claudia there is custom style [1] which allows to provide its
own GMF EditPart to customize for example the draw2d rendering, but this
custom style is only usable for Node but not for Edge and Container. If
you want you can raise a bugzilla enhancement about this need. Perhaps a
possible work-around could be to provide your own
"org.eclipse.gmf.runtime.diagram.ui.editpartProviders" extension with a
priority higher than the one defined in
org.eclipse.sirius.diagram.ui/plugin.xml to provide your own EditPart
extending DEdgeEditPart but be aware that it could impact all Sirius
based editors.
2. To customize the place where a node is layouted you can use a
interface called
org.eclipse.sirius.diagram.ui.business.api.view.SiriusLayoutDataManager.
You must use it after the representation is created and refreshed,
including the GMF part. After that you get the GMF view corresponding to
your node and calls for example :
SiriusLayoutDataManager.INSTANCE.addData(new RootLayoutData(createdView,
newLocation, new Dimension(-1, -1)));
Best Regards.
[1]
https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_style.html
--
Esteban Dugueperoux - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03001 seconds