Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » installEditPolicy in AbstractEditPart
installEditPolicy in AbstractEditPart [message #239400] Thu, 25 October 2007 17:01 Go to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi,

As I was digging in the source code I arrived in the
install/removeEditPolicy source code of GEF. I was quite surprised to see
that the policies are kept in an Object array and that
the "installEditPolicy" do not seem to remove another policy having the
same role key.

I'm quite curious about these choices as it may make sense in another
context, why not using a HashMap or something like that ? Why bothering
about the array allocation when an edit policy is added ?

Thanks for your input,

cheers,

Cédric


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: installEditPolicy in AbstractEditPart [message #239409 is a reply to message #239400] Fri, 26 October 2007 01:35 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi C
Re: installEditPolicy in AbstractEditPart [message #239428 is a reply to message #239409] Mon, 29 October 2007 07:23 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Thank you for your answer. Then I understand from it that it's done to
decrease the memory footprint of the edit parts, but then I'm still
wondering, using a GMF-based diagram editor we experienced having "doubles"
in the edit-part, for a "who know why" reason the "installEditPolicies()"
method is sometime called again. Then the memory footprint is bigger and
the behavior may seems strange some time.

I guess it's something we should track down and report a bug on GMF if (but
I'm really not sure) it comes from a use case of the GMF tooling.

Cédric


Anthony Hunter wrote:

> Hi C


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: installEditPolicy in AbstractEditPart [message #239478 is a reply to message #239428] Tue, 30 October 2007 14:26 Go to previous message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi C
Previous Topic:Doubt for multipage Graphical editor
Next Topic:Any performance impact when SWGraphics.setAntialias(SWT.ON)
Goto Forum:
  


Current Time: Sat Apr 20 01:09:29 GMT 2024

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

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

Back to the top