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

Frank Dyck wrote:
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.


Bound to the resource or the resource type? Is your pallete more like the outline view in that it presents some data from the Views model?




But my question is more: How do i store it? ItÂs an rdf model.

your asking how to store the model or how to store the palette? or both?

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...)



I had properties before I ever made my property editor page. Gotta start somewhere.



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.



again, im getting mixed up. The rdf is the model, or the palette or is this the same thing? or is the resource the model?




--
Respectfully,


CL Gilbert

"Verily, verily, I say unto you, He that entereth not by the door() into the sheepfold{}, but climbeth up some other *way, the same is a thief and a robber."

GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD  19AE 55B2 4CD7 80D2 0A2D

For a free Java interface to Freechess.org see http://www.rigidsoftware.com/Chess/chess.html