Palette View Refresh without open and close [message #241313] |
Wed, 06 February 2008 16:21 |
Eclipse User |
|
|
|
Originally posted by: ranjeev.backbase.com
Hello there,
Context:
I am using GEF Palette to dispaly the PaletteContainer and Palette
Items. And the canvas is actually not from GEF. I have my own model
which holds the data on how the Palette tree structure will be built.
I have a created an Eclipse View which contains my own Viewer (say
DesignerPaletteViewer) which extends
org.eclipse.gef.ui.palette.PaletteViewer
My model is returned by this code Object[] contributions =
PaletteCoreManager.getInstance().getContributions();
the contributions array contains all my contribution.
my createBasicPaletteControls() creates SelectionToolEntry (which get
loaded always)
I have the following method in DesignerPaletteViewer:
public void displayPalette() throws PaletteCoreException {
createBasicPaletteControls();
Object[] contributions =
PaletteCoreManager.getInstance().getContributions();
addPaletteContributions(contributions);
setPaletteRoot(paletteRoot);
this.setActiveTool(selectionTool);
}
My problem is when I run this code, it does not refresh the Viewer until
I close and open the Palette View in Eclipse manually. I may have some
WorkspaceJob running in the backgroud to load the model, once it is
loaded I want that the notifier updates the DesignerPaletteViewer
dynamically., which inturn displays my complete Palette Tree structure.
Is there a way to refresh the PaletteViewer?
I am using GEF 3.3.1
Thanks in Advance
Ranjeev
|
|
|
|
Powered by
FUDForum. Page generated in 0.02658 seconds