Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Why the Palette Model has changed
Why the Palette Model has changed [message #68195] Tue, 04 March 2003 15:34
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Two big changes have happened to the palette. First, all interfaces were
removed and the default implementations were renamed to the interface names.
The reason for this is to allow for evolution of the palette. If we shipped
with interfaces, we could never add to those interfaces for fear of breaking
someone who decided to reimplement them. Also, there is no reason to have
both interface and implementation in this case. An example of a feature we
might add in the future would be the ability to disable a Tool (i.e. it
becomes gray).

The other change was in PaletteToolEntry. The Logic example *used* to create
a new palette model for every Editor that was opened. This worked fine for
that example. But, given the new cusomization feature, it is more likely
that the palette model is a SINGLETON on the plugin. Thus, when the user
makes changes to the palette (re-ordering, hiding stuff he doesn't use,
etc), these changes will take effect for all Editors of the same type at
once. So, there were concerns with having a single palette model shared
across multiple open editors. The old PaletteToolEntry.getTool() method
looked like it was safe to return the same tool whenever asked. This is not
the case. If the connection tool were being shared across two editors, it
would lead to serious bugs. So, PaletteToolEntries became a "tool factory".
The method was renamed createTool(), and two editors sharing the same
palette would get two separate tool instances.
Previous Topic:what happened to org.eclipse.gef.requests.DeleteRequest?
Next Topic:[Draw2D] How to assign a property view to a draw2D figure.
Goto Forum:
  


Current Time: Mon Jul 22 05:04:58 GMT 2024

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

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

Back to the top