Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » palette reload
palette reload [message #184013] Thu, 09 June 2005 10:04 Go to next message
Eclipse UserFriend
Originally posted by: penzhan8451.yahoo.com

Hi,

Now , I want to dynamic config my editor's palette according to a value

defined in property file (example : if 'yes', i will display a tool in the

palette; or disappear the tool).


how could i reach it ? would you like to help me ?


Thanks & best regards.
Re: palette reload [message #184049 is a reply to message #184013] Thu, 09 June 2005 17:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: harsh.ti.com

Hi There,

I had asked a similar question earlier. If you want to dynamically add a
tool based on some criteria such as you outlined, from the editor you need
to get the PaletteRoot. From the PaletteRoot, I will assume you are using
Drawer's to group objects and that the Tool Entries are of type
CombinedTemplateCreationEntry. Then you simply append the tool to the
group. Here is a psuedo example.

//Get the drawer of interest from the PaletteRoot (You might want to
expose this for ease of use)
PaletteDrawer socDrawer = _DelegatePaletteCreator.getSocDrawer();

//Create the tool entry (if not already done)
CombinedTemplateCreationEntry dpEntry = new
CombinedTemplateCreationEntry(...)

//And now simply add
socDrawer.add(dpEntry);

It will dynamically show up in the palette. You can do the reverse just
as easily by removing the dpEntry.

Regards,
Harsh
Re: palette reload [message #184066 is a reply to message #184049] Fri, 10 June 2005 01:51 Go to previous message
Eclipse UserFriend
Originally posted by: penzhan8451.yahoo.com

Thanks very much! I would try it later !
Previous Topic:Problem with drawing figures.
Next Topic:Logic example uses deprecated IPluginDescriptor
Goto Forum:
  


Current Time: Fri Dec 13 03:51:12 GMT 2024

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

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

Back to the top