Bug 179593 - Provide UI mechanism for configuring the active tools settings
Summary: Provide UI mechanism for configuring the active tools settings
Status: REOPENED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-27 15:12 EDT by Tonny Madsen CLA
Modified: 2015-01-22 02:36 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tonny Madsen CLA 2007-03-27 15:12:49 EDT
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 ;-)
Comment 1 Randy Hudson CLA 2007-03-28 00:31:05 EDT
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.
Comment 2 Tonny Madsen CLA 2007-03-28 02:33:28 EDT
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..)
Comment 3 Randy Hudson CLA 2007-03-28 09:54:19 EDT
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?
Comment 4 Tonny Madsen CLA 2007-04-12 06:35:34 EDT
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...
Comment 5 Randy Hudson CLA 2007-04-13 08:10:09 EDT
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.
Comment 6 Tonny Madsen CLA 2007-04-13 15:38:58 EDT
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 :-))