Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Questions about diagram elements arrangements and custom appearance
Questions about diagram elements arrangements and custom appearance [message #1716560] Fri, 04 December 2015 19:54 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
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.
index.php/fa/24182/0/

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 #1717196 is a reply to message #1716560] Thu, 10 December 2015 16:31 Go to previous messageGo to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Anyone knows ...? Rolling Eyes
Re: Questions about diagram elements arrangements and custom appearance [message #1717440 is a reply to message #1717196] Sun, 13 December 2015 19:21 Go to previous messageGo to next message
Kianoush Dortaj is currently offline Kianoush DortajFriend
Messages: 4
Registered: November 2015
Junior Member
گفتنت تابلوه ک ایرانیی خخخخخخخخ Any one Know

[Updated on: Sun, 13 December 2015 19:22]

Report message to a moderator

Re: Questions about diagram elements arrangements and custom appearance [message #1718351 is a reply to message #1717440] Tue, 22 December 2015 18:43 Go to previous messageGo to next message
Claudia Irvine is currently offline Claudia IrvineFriend
Messages: 30
Registered: July 2015
Member
1. I too need a custom edge style for ER diagramming and was unable to find a solution.
2. See https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_style.html
3. I was able to get this to work with a 16x16 pixel png
Re: Questions about diagram elements arrangements and custom appearance [message #1718613 is a reply to message #1716560] Mon, 28 December 2015 10:20 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
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
Re: Questions about diagram elements arrangements and custom appearance [message #1718836 is a reply to message #1718613] Wed, 30 December 2015 22:27 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Thanks Esteban for your answer,

regarding your answer on diagram layout,

1: Should I use Java Extensions?

If I need to use Java Extensions:
2: Currently, I keep both my design project and modelling project in the new eclipse runtime version. The reason is to see the changes on the design to the modelling diagram instantly and realtime. But if I need to use Java Extensions, I have to keep the design project in the main eclipse version and create the modeling project in the runtime eclipse version, which makes the design progress slow (since I need to re-run the runtime eclipse whenever I change the design). Is there any ways to add Java Extensions and still keep the design and the modelling projects in the same eclipse environment?

Thanks,
Bests,
Parsa
Previous Topic:Anchorage points on SVG elements
Next Topic:Problem with the Create Node Tool
Goto Forum:
  


Current Time: Wed Jan 20 04:07:42 GMT 2021

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

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

Back to the top