Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » implementing ILayoutNodeProvider - best practices
implementing ILayoutNodeProvider - best practices [message #200201] Mon, 04 August 2008 16:47 Go to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Hi

I'm implementing my custom layout provider and I have the dilemma: to
override AbstractLayoutNodeProvider or AbstractLayoutEditPartProvider?

AbstractLayoutEditPartProvider encourage me to create commands for every
node move, which consumes much more computer resources. What is it for?
Does it have any benefits over simple implementation of
ILayoutNodeProvider#layoutLayoutNodes, which creates Runnable with
algorithm implementation and returns it?

Greetings,
Seweryn Niemiec
Re: implementing ILayoutNodeProvider - best practices [message #200216 is a reply to message #200201] Mon, 04 August 2008 17:40 Go to previous messageGo to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Seweryn Niemiec wrote:
> AbstractLayoutEditPartProvider encourage me to create commands for every
> node move, which consumes much more computer resources. What is it for?

After some debugging I have found that using
AbstractLayoutEditPartProvider is actually a very BAD practice because
in this case computer will perform layout computations and
requests+commands creations two times per every selection of node
supported by my layout provider. This is caused by the fact that actual
computations are performed by the code which prepares layouting Runnable
instead of inside of Runnable's run() method.

If I'm not wrong, probably there should be filled a bug describing this
issue.

Greetings,
Seweryn Niemiec
Re: implementing ILayoutNodeProvider - best practices [message #200303 is a reply to message #200216] Tue, 05 August 2008 08:26 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Seweryn,

Is it something like: https://bugs.eclipse.org/bugs/show_bug.cgi?id=240732 ?

-----------------
Alex Shatalin
Previous Topic:Properties view add buttons
Next Topic:Node mappin -context menu
Goto Forum:
  


Current Time: Sat Jun 06 11:14:09 GMT 2020

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

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

Back to the top