Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Palette View Refresh without open and close
Palette View Refresh without open and close [message #241313] Wed, 06 February 2008 16:21 Go to next message
Eclipse UserFriend
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
Re: Palette View Refresh without open and close [message #241322 is a reply to message #241313] Wed, 06 February 2008 18:28 Go to previous message
Xiang Qinxian is currently offline Xiang QinxianFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

Ranjeev 写道:
> 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
This tell us the viewer work fine. but not updated

> 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?
Not known your refresh efect, so guess check GEF PaletteView, which has
a perspective listener registered.
>
> I am using GEF 3.3.1
>
> Thanks in Advance
> Ranjeev

Regards,
Xiangya
Previous Topic:Workbench state is not being saved for GEF editor
Next Topic:Exception in gef shapes example:java.lang.NoClassDefFoundError: Could not initialize class org.eclip
Goto Forum:
  


Current Time: Fri Apr 26 21:37:07 GMT 2024

Powered by FUDForum. Page generated in 0.02942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top