Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Adjusting CreateConnectionContext
Adjusting CreateConnectionContext [message #915388] Mon, 17 September 2012 07:30 Go to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

Adjusting CreateConnectionContext

https://raw.github.com/jeeeyul/graphiti-overview/master/net.jeeeyul.erd.resource/connection-figure1.png
Figure 1


As you can see on Figure 1, Creation Connection feedback shows negative mouse pointer to users.
Because, table can reference only tables, not columns.
In common sense, we know that user is not trying to connect table to column.

But ICreateConnectionContext is automatically populated, and there is no chance to adjust context.

I tried some hack(commented by Christian Brand - let some methods works against of column context) in isolated space(inside of CreateConnectionFeature) to walk around this problem, but there were several side effects in Feedback UI:
* When connection started from column, feedback seems to uses column PE's chopbox anchor, not table.
* Target table may be highlighted when mouse is over. But column will be highlighted because it is active PE.

I can use transformed context for canCreate, canStartConnection, create, but I can't handle automatically populated feedback UI. so, I think transforming context should have to be part of graphiti.

ToolBehaviorProvider provides a way to adjust location info for direct editing, I think it would be great what if there is some adjust method like ToolBehaviorProvider#getLocationInfo.

Each creatation of connection may have different sense, So I suggest that locate adjust method onto create connection feature.
Re: Adjusting CreateConnectionContext [message #916583 is a reply to message #915388] Wed, 19 September 2012 07:42 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
>ToolBehaviorProvider provides a way to adjust location info for direct
>editing, I think it would be great what if there is some adjust method like
> >ToolBehaviorProvider#getLocationInfo.

IToolBehaviorProvider.getChopboxAnchorArea should be the hook you are
looking for.

Michael
Re: Adjusting CreateConnectionContext [message #916610 is a reply to message #916583] Wed, 19 September 2012 08:21 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

Quote:

IToolBehaviorProvider.getChopboxAnchorArea should be the hook you are
looking for.


Thanks!


IToolBehaviorProvider.getChopboxAnchorArea seems to let me can choose graphics algorithm for PE to use as chopbox anchor. So I tried some experiments and debugged.

But IAnchorContainerDelegate doesn't allow to use chopbox target as a GA which is not contained by PE.
It simply ignored what toolbarBehavior returned. I think it tries to find actual draw2d figure in child direction only.

So in my case, I can't delegate column PE's anchor to table PE's GA.
As a result, There was no change. (fall back algorithm was applied).

No matter whether IAnchorContainerDelegate allows none-contained GA as an anchor or not, There are still some problems remains:
* Each connection creation may have different nature and sense.
* Implementation of a CreateConnectionFeature easily get too complex.
Re: Adjusting CreateConnectionContext [message #917694 is a reply to message #916610] Thu, 20 September 2012 10:37 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Not sure what the rationale behind this behavior is, if there is one. That
surely deserves a closer look, would you open a bugzilla to track that?

Thanks,
Michael
Previous Topic:Documentation for Pattern ?
Next Topic:GraphicsAlgorithm coordinates: relative to....?
Goto Forum:
  


Current Time: Thu Apr 25 03:51:41 GMT 2024

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

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

Back to the top