Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » implementing ILayoutNodeProvider - best practices
implementing ILayoutNodeProvider - best practices [message #200201] Mon, 04 August 2008 12:47 Go to next message
Eclipse UserFriend
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 13:40 Go to previous messageGo to next message
Eclipse UserFriend
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 04:26 Go to previous message
Eclipse UserFriend
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 May 03 12:22:27 EDT 2025

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

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

Back to the top