[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: where to store customized palette?
|
Do you want the palette to be shared in a team environment? If so, it must
be in the resource (or a resource somewhere). If not, it can be in lots of
other places. There is a way to have eclipse create a meta file related to
a given resource. Eclipse will then delete that file for you when the
corresponding resource is gone, but then you can't get it back.
"Frank Dyck" <notmymail@xxxxxxxx> wrote in message
news:opshnzmwsis96bjs@xxxxxxxxxx
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.