Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Problem with Bordered Nodes(Position of bordered nodes on the main container)
Problem with Bordered Nodes [message #1403407] Wed, 23 July 2014 13:26 Go to next message
L P is currently offline L PFriend
Messages: 1
Registered: July 2014
Junior Member
Hi all!

I need to create an editor for logical operators (AND, OR, XOR, etc...) and I can't manage to specify the location of the bordered nodes that I use.

Here is the content of my default layer: I have a main container which has multiple bordered nodes.
In fact, I need two kinds of nodes:
- The first category will represent the inputs of my logical operator. Therefore, I need them on the left side of my main container.
- The second category will represent the outputs of my logical operator. Consequently, they need to be on the right side of my main container.
So far, all I can do is arranging randomly the bordered nodes, it puts the inputs on the top of the container and the outputs on the left side. But again, this is not the expected shape of my logical operator.

Best Regards.
Re: Problem with Bordered Nodes [message #1403499 is a reply to message #1403407] Thu, 24 July 2014 08:06 Go to previous messageGo to next message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 193
Registered: May 2010
Senior Member

Hi,

it is indeed possible to customize the position of your elements
according to your own business rules.

Before Sirius was open-sources, we used to have a complete developper
documentation including an entry about this topic

We did not have the time to migrate it to Sirius yet, but in the meatime
you can read the previous version here [1]

Best regards,
Alex

[1]
http://docs.obeonetwork.com/obeodesigner/6.2/viewpoint/developer/general/extensions-provide_custom_style.html
Re: Problem with Bordered Nodes [message #1403505 is a reply to message #1403499] Thu, 24 July 2014 08:28 Go to previous messageGo to next message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 193
Registered: May 2010
Senior Member

Hi,

we have opened a feature request to simplify the way you can customize
nodes positions, if you want to vote for it :)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=440296
Re: Problem with Bordered Nodes [message #1404362 is a reply to message #1403505] Thu, 31 July 2014 14:22 Go to previous messageGo to next message
Thomas Muller is currently offline Thomas MullerFriend
Messages: 9
Registered: September 2011
Junior Member
Hi,

I'm currently addressing the same goal.
I've created a style configuration provider for my logic components which have border nodes where I implement getBorderItemLocatorProvider().

This locator provider then creates instances of DBorderItemLocator(final IFigure parentFigure, final int preferredSide) where I specify the side of the figure at which I want my border node to appear : PositionConstants.EAST or PositionConstants.WEST.

However, the getPreferredLocation(final IFigure borderItem) method always returns a position which is relative to the top left corner... which I think is a bug (which I think lays in this.getAbsoluteToBorder(constraintLocation);.
Thus I've ended overriding this methods to calculate my own preferred location.

Could someone have a look at it?

Best regards.
Re: Problem with Bordered Nodes [message #1404364 is a reply to message #1404362] Thu, 31 July 2014 14:35 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Thomas

Le 31/07/2014 16:22, Thomas Muller a écrit :
> Hi,
> I'm currently addressing the same goal.
> I've created a style configuration provider for my logic components
> which have border nodes where I implement getBorderItemLocatorProvider().
>
> This locator provider then creates instances of DBorderItemLocator(final
> IFigure parentFigure, final int preferredSide) where I specify the side
> of the figure at which I want my border node to appear :
> PositionConstants.EAST or PositionConstants.WEST.

Could you try with a
org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator ?
DBorderItemLocator is not currently capable to keep your preferred side,
but it tries to avoid positions conflicts, overlaps, .. and to locate
bordered items all over the parent.

>
> However, the getPreferredLocation(final IFigure borderItem) method
> always returns a position which is relative to the top left corner...
> which I think is a bug (which I think lays in
> this.getAbsoluteToBorder(constraintLocation);.
> Thus I've ended overriding this methods to calculate my own preferred
> location.
>
> Could someone have a look at it?
>
> Best regards.
>

Regards,

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Style for the root diagram element?
Next Topic:Error in Activator.java
Goto Forum:
  


Current Time: Sat Apr 27 03:43:58 GMT 2024

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

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

Back to the top