Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 28290 Details for
Bug 110765
Allow to customize palette model creation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix for DiagramEditorWithFlyOutPalette.
DiagramEditorWithFlyOutPalette.txt (text/plain), 2.73 KB, created by
Cherie Revells
on 2005-10-14 11:09:24 EDT
(
hide
)
Description:
Fix for DiagramEditorWithFlyOutPalette.
Filename:
MIME Type:
Creator:
Cherie Revells
Created:
2005-10-14 11:09:24 EDT
Size:
2.73 KB
patch
obsolete
>Index: DiagramEditorWithFlyOutPalette.java >=================================================================== >RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/parts/DiagramEditorWithFlyOutPalette.java,v >retrieving revision 1.5 >diff -u -r1.5 DiagramEditorWithFlyOutPalette.java >--- DiagramEditorWithFlyOutPalette.java 5 Oct 2005 20:10:02 -0000 1.5 >+++ DiagramEditorWithFlyOutPalette.java 14 Oct 2005 15:01:34 -0000 >@@ -58,7 +58,13 @@ > public void activityManagerChanged( > ActivityManagerEvent activityManagerEvent) { > if (activityManagerEvent.haveEnabledActivityIdsChanged()) { >- updatePaletteRoot(); >+ if (getEditDomain() != null >+ && getEditDomain().getPaletteViewer() != null >+ && getEditDomain().getPaletteViewer().getPaletteRoot() != null) { >+ >+ createPaletteRoot(getEditDomain().getPaletteViewer() >+ .getPaletteRoot()); >+ } > } > } > } >@@ -119,7 +125,7 @@ > */ > protected PaletteViewerProvider createPaletteViewerProvider() { > assert fHasFlyoutPalette == true; >- getEditDomain().setPaletteRoot(createPaletteRoot()); >+ getEditDomain().setPaletteRoot(createPaletteRoot(null)); > return new PaletteViewerProvider(getEditDomain()){ > > /** >@@ -334,26 +340,23 @@ > } > > /** >- * Creates the palette root for the palette viewer. >+ * Creates the palette root for the palette viewer or updates the existing >+ * palette root passed in if entries should be added/removed based on the >+ * current state. > * >- * @return the new palette root >- */ >- private PaletteRoot createPaletteRoot() { >- return PaletteService.getInstance().createPalette(this, >- getDefaultPaletteContent()); >- } >- >- /** >- * Updates the palette root by adding/removing entries as necessary. >- */ >- private void updatePaletteRoot() { >- if (getEditDomain() != null >- && getEditDomain().getPaletteViewer() != null >- && getEditDomain().getPaletteViewer().getPaletteRoot() != null) { >- >- PaletteService.getInstance().updatePalette( >- getEditDomain().getPaletteViewer().getPaletteRoot(), this, >+ * @param existingPaletteRoot >+ * the existing palette root if the palette has already been >+ * created, or null if the palette root has not yet been created >+ * @return the new palette root or the updated palette root >+ */ >+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) { >+ if (existingPaletteRoot == null) { >+ return PaletteService.getInstance().createPalette(this, > getDefaultPaletteContent()); >+ } else { >+ PaletteService.getInstance().updatePalette(existingPaletteRoot, >+ this, getDefaultPaletteContent()); >+ return existingPaletteRoot; > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 110765
: 28290