Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Adjusting CreateConnectionContext
Adjusting CreateConnectionContext [message #915388] Mon, 17 September 2012 03:30 Go to next message
Jeeeyul Lee is currently offline Jeeeyul Lee
Messages: 108
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 03:42 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1574
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 04:21 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul Lee
Messages: 108
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 06:37 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1574
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: Tue Jul 29 02:53:42 EDT 2014

Powered by FUDForum. Page generated in 0.07319 seconds