Community
Participate
Working Groups
I would like to implement a number of options in the palette. Currently this seems to be impossible as all palette EditParts must inherit from PaletteEditPart (due to saveState and restoreState). And PaletteEditPart is internal and thus inaccessible. My only option seems to be to copy org.eclipse.gef.internal.ui.palette.editparts.* to my own plug-in.... But that cannot be right ;-)
The Palette editparts are internal because these classes are implementation detail that are not part of the API. It is the same with JFace's PartSashContainer, ViewPane, etc. The implementation could change between releases. For example, maybe GEF should switch to using SWT's ExpandBar at some point. Currently, we could do this without breaking our "contract" with clients. You can reference internal packages from your plug-in. Copying should not be the only option. Can you start by presenting the types of options you are trying to do? Maybe a better solution is for GEF to support those options, rather than committing to the current mechanism for how GEF solves the problem of displaying a bunch of push buttons.
I would like to present a number of checkbox options as well as a number of comboboxes. (And yes, I know that GEF/Draw2D does not have support for the later, so they would need to be simulated anyway..)
But why do these checkboxes and combos have to be inside the palette? What's their relationship to the rest of the palette? Have you looked at PaletteStack?
The checkboxes should be used to alter the behavior of some of the tools. E.g. the select and marquee tool can either select all objects or just the object with a specific state (which means they can be altered/manipulated). For now, I have changed the palette into a ordinary toolbar, and that works just fine...
The way photoshop does this, the active tool replaces a portion of the toolbar so that it can be configured. This scales better than reserving a static configuration area for every tool, whether or not it is active. Two different tools could share their preferences values, as with selection and marquee tool. This sounds like a reasonable enhancement for GEF, but not a reason to open up the internal implementation and prevent GEF from making significant changes to the palette in the future.
Sounds good. I just hope that the extension will not limit the possible controls that can be added. Reasonable controls could be check boxes, radio groups, combos and plain editing fields (well, just about everything :-))