[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: where to store customized palette?

On Wed, 17 Nov 2004 18:40:31 -0500, CL [dnoyeb] Gilbert <Lamont_Gilbert@xxxxxxxxxxxxxxxxx> wrote:

Frank Dyck wrote:
Ok I got a nice GEF editor with a very customizable palette.
I have implemented saving and reading the palette from an rdf file.
At the moment it is simply saved along with the diagram into the same file as the diagrammodel which is also an rdf file.
Where should I normally store the palette?
In the plugin preferences? or as a propertypage of the resource?



I would save it in the preferences. unless you want each editor view to have its own customized palette.


Preferences store = yourPlugin.getDefault().getPluginPreferences(); //a static method of grabbing your plugin, then getting the preferences from it


Well actually the palette is more bound the resource you create with it. So IÂm thinking more property at the moment.

But my question is more: How do i store it? ItÂs an rdf model.
As far as i understand you normally add string properties to a property page.
It also makes not much sense ATM do be able to edit it in either a property or preferences page. (Or iÂd have to put the whole PaletteCustomizer functionality into the page...)


So at the moment I just want to store the rdf model or file somewhere along with the resource, and be able to load it on startup (from Editor.java) and get/set it from the customizerÂs save/revertToSaved methods.