Community
Participate
Working Groups
Class org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette has methods createPaletteRoot() and updatePaletteRoot() to provide palette contents; I propose to change their visibility from private to protected so clients may provide their own custom and efficient code to fill palette model. When diagram editor is generated it's easier to maintain palette definition in java code so the user may fine-tune it; plugin.xml also becomes noticeably smaller.
Sounds like a reasonable request to provide client flexibility. However, I'm assuming this is "all or nothing"? If clients decide to bypass the PaletteService, then they would have to override both these methods. Alternatively - would the suggested way to accomplish this would be to create their own PaletteProvider (overriding the DefaultPaletteProvider? Then these methods could remain private.
Well, I mean that it would be simplier and faster to call generated palette factory code directly from generated diagram editor class and use palette service as an extension mechanism, possibly by calling some method in generated diagram editor superclass. There are also common contributions that custom editor may wish to exclude or replace; it's not possible now right? It may also be desirable to allow custom palette update schemes; now as I understand it is updated only when activities are changed. In custom editors for example some tools may be available only when diagram model element has a specific property or specific node exists on diagram. In this sense the whole runtime is quite closed, since services dictate how palette or edit part viewer should be filled; I think that users should extend by subclassing first and allow third-party contributions by calling hooks in superclasses.
Changing component to "Runtime Diagram"
Created attachment 28290 [details] Fix for DiagramEditorWithFlyOutPalette. Contributed by: Cherie Mahoney
Resolved. See attached patch. Purpose: Bugzilla 110765 Allow to customize palette model creation - DiagramEditorWithFlyoutPalette.createPaletteRoot() is now protected. - Removed private method DiagramEditorWithFlyoutPalette.updatePaletteRoot(). The createPaletteRoot() method now optionally takes an existing palette root as a parameter in which case an update should be done. Activities: Bugzilla 110765 gmf_head sshaw 051013 Allow to customize palette model creation Code Reviewed by: Steve How tested: JUnit Tests: OK, Runs: 64, Fails: 0, Errors: 0, org.eclipse.gmf.tests.runtime.diagram.ui, Time: 83.718
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug