Skip to main content



      Home
Home » Eclipse Projects » GEF » where to store customized palette?
where to store customized palette? [message #158395] Wed, 17 November 2004 18:22 Go to next message
Eclipse UserFriend
Originally posted by: notmymail.mail.net

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 fi=
le =

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?
Re: where to store customized palette? [message #158403 is a reply to message #158395] Wed, 17 November 2004 18:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

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






--
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
Re: where to store customized palette? [message #158462 is a reply to message #158403] Thu, 18 November 2004 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: notmymail.mail.net

On Wed, 17 Nov 2004 18:40:31 -0500, CL [dnoyeb] Gilbert =

<Lamont_Gilbert@rigidsoftware.com> 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 =3D yourPlugin.getDefault().getPluginPreferences(); =
//a =

> static method of grabbing your plugin, then getting the preferences fr=
om =

> it
>

Well actually the palette is more bound the resource you create with it.=

So I=C2=B4m thinking more property at the moment.

But my question is more: How do i store it? It=C2=B4s 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=C2=B4d 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=C2=B4s save/revertToSav=
ed =

methods.
Re: where to store customized palette? [message #158493 is a reply to message #158462] Thu, 18 November 2004 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

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@mail.net> wrote in message
news:opshnzmwsis96bjs@celeron...
On Wed, 17 Nov 2004 18:40:31 -0500, CL [dnoyeb] Gilbert
<Lamont_Gilbert@rigidsoftware.com> 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
Re: where to store customized palette? [message #158550 is a reply to message #158462] Thu, 18 November 2004 15:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Frank Dyck wrote:
> On Wed, 17 Nov 2004 18:40:31 -0500, CL [dnoyeb] Gilbert
> <Lamont_Gilbert@rigidsoftware.com> 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
Re: where to store customized palette? [message #158712 is a reply to message #158550] Fri, 19 November 2004 09:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: notmymail.mail.net

>>> I would save it in the preferences. unless you want each editor vie=
w =

>>> to have its own customized palette.
>>>
>>> Preferences store =3D 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=C2=B4m 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?
>
>

Bound to the resource. There is only one type that my editor opens.
I think i don`t understand the second question...
My palette provides tools to generate the views model.


>> But my question is more: How do i store it? It=C2=B4s an rdf model.
>
> your asking how to store the model or how to store the palette? or bot=
h?
>

Store the palette (the palette-model :-))
Sorry about the misleading terms.
I convert the gef-palette to an RDFModel object which i can read/write t=
o =

a file.


>> 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=C2=B4d have to put the whole =

>> PaletteCustomizer functionality into the page...)
>>
>
> I had properties before I ever made my property editor page. Gotta =

> start somewhere.
>

How do you setProperties of a Resource?
I`m a complete newbie to this.
I just added the example extension PropertyPage and looked at it a bit.
As far as i see it without the property page i would do something like =

this,
where i normally write the palette to a file:

ResourcesPlugin.getWorkspace().getRoot().setPersistentProper ty(
new QualifiedName("", PALETTE_PROPERTY),
someShortStringValue);

Where the value should be representing the palette.

But setPersistentProperty says to store short strings as values.
I want to store an object of the type RDFModel.
I mean i can convert it to a String but it won`t be under 2KB short!


>> 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=C2=B4s save/revertTo=
Saved =

>> methods.
>>
>
> again, im getting mixed up. The rdf is the model, or the palette or i=
s =

> this the same thing? or is the resource the model?



:-) It`s pretty confusing/misleading.
I convert the palette to an rdf-model-object(from jena). So that is what=
i =

want to store.
(I want to be able to export it later and can already read in palettes =

from rdf files.)
Re: where to store customized palette? [message #158900 is a reply to message #158712] Fri, 19 November 2004 21:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

I am beginning to think that when you say palette you just mean model.
When we say palette here we mean a set of tools that are displayed in a
specific view. Such as, line draw tool, selection tool, text tool, etc.
When these are all put together in a sort of tool bar, we call it a
pallette.

If you mean the storable class that gets written to and read from a
file, or some other storage medium, we call that the model.

Is that consistent with what you are thinking?


Frank Dyck wrote:
>
>>>> 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?
>>
>>
>
> Bound to the resource. There is only one type that my editor opens.
> I think i don`t understand the second question...
> My palette provides tools to generate 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?
>>
>
> Store the palette (the palette-model :-))
> Sorry about the misleading terms.
> I convert the gef-palette to an RDFModel object which i can read/write
> to a file.
>
>
>>> 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.
>>
>
> How do you setProperties of a Resource?
> I`m a complete newbie to this.
> I just added the example extension PropertyPage and looked at it a bit.
> As far as i see it without the property page i would do something like
> this,
> where i normally write the palette to a file:
>
> ResourcesPlugin.getWorkspace().getRoot().setPersistentProper ty(
> new QualifiedName("", PALETTE_PROPERTY),
> someShortStringValue);
>
> Where the value should be representing the palette.
>
> But setPersistentProperty says to store short strings as values.
> I want to store an object of the type RDFModel.
> I mean i can convert it to a String but it won`t be under 2KB short!
>
>
>>> 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?
>
>
>
>
> :-) It`s pretty confusing/misleading.
> I convert the palette to an rdf-model-object(from jena). So that is what
> i want to store.
> (I want to be able to export it later and can already read in palettes
> from rdf files.)


--
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
Re: where to store customized palette? [message #158915 is a reply to message #158900] Sat, 20 November 2004 10:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: notmymail.mail.net

It is the palette-tools that i want to store. But mine have parameters.

In my editor there are only two model classes GenericNode and =

GenericConnection,
which represent rdf Resources. Different rdf-properties are passed as =

parameters to the Generic model=C2=B4s contructors.

So accordingly there are also only two generic ToolEntry types which als=
o =

have to store parameters to pass to the generic model that they create.=


The palette represents an rdf schema, the diagram in the editor pane =

represents an rdf-file that is built from that schema.

So i haven`t got many diffrent toolentry classes but only two with lots =
of =

parameters to store.



> I am beginning to think that when you say palette you just mean model.=
=

> When we say palette here we mean a set of tools that are displayed in =
a =

> specific view. Such as, line draw tool, selection tool, text tool, et=
c. =

> When these are all put together in a sort of tool bar, we call it a =
=

> pallette.
>
> If you mean the storable class that gets written to and read from a =

> file, or some other storage medium, we call that the model.
>
> Is that consistent with what you are thinking?
>
>
> Frank Dyck wrote:
>>
>>>>> I would save it in the preferences. unless you want each editor =

>>>>> view to have its own customized palette.
>>>>>
>>>>> Preferences store =3D 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=C2=B4m 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?
>>>
>>>
>> Bound to the resource. There is only one type that my editor opens.
>> I think i don`t understand the second question...
>> My palette provides tools to generate the views model.
>>
>>>> But my question is more: How do i store it? It=C2=B4s an rdf model.=

>>>
>>>
>>> your asking how to store the model or how to store the palette? or =

>>> both?
>>>
>> Store the palette (the palette-model :-))
>> Sorry about the misleading terms.
>> I convert the gef-palette to an RDFModel object which i can read/writ=
e =

>> to a file.
>>
>>>> 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=C2=B4d have to put the whole =
=

>>>> PaletteCustomizer functionality into the page...)
>>>>
>>>
>>> I had properties before I ever made my property editor page. Gotta =
=

>>> start somewhere.
>>>
>> How do you setProperties of a Resource?
>> I`m a complete newbie to this.
>> I just added the example extension PropertyPage and looked at it a bi=
t.
>> As far as i see it without the property page i would do something lik=
e =

>> this,
>> where i normally write the palette to a file:
>> ResourcesPlugin.getWorkspace().getRoot().setPersistentProper ty(
>> new QualifiedName("", PALETTE_PROPERTY),
>> someShortStringValue);
>> Where the value should be representing the palette.
>> But setPersistentProperty says to store short strings as values.
>> I want to store an object of the type RDFModel.
>> I mean i can convert it to a String but it won`t be under 2KB short!
>>
>>>> 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=C2=B4=
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?
>> :-) It`s pretty confusing/misleading.
>> I convert the palette to an rdf-model-object(from jena). So that is =

>> what i want to store.
>> (I want to be able to export it later and can already read in palette=
s =

>> from rdf files.)
>
>
Re: where to store customized palette? [message #158923 is a reply to message #158915] Sat, 20 November 2004 11:13 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

We agree on model, and view as well. But palette, and tool I am not
understanding. a palette is just a set of tools, but yours is more than
that?

Each different file you open (which is an rdf-file) will open a palette
as well. And that palette is setup to match the schema type of that
particular rdf-file?

If this is correct then you can either store data in your file which
will tell your editor which palette to associate with it, or you can
store meta-data on your file in the IFile which represents your file in
the workspace, and use that meta-data to tell your editor which palette
to open, or how to populate it.

For instance, when you open a project, it has natures attached to it
that tell eclipse what tools should be associated with it among other
things.


Frank Dyck wrote:
> It is the palette-tools that i want to store. But mine have parameters.
>
> In my editor there are only two model classes GenericNode and
> GenericConnection,
> which represent rdf Resources. Different rdf-properties are passed as
> parameters to the Generic model´s contructors.
>
> So accordingly there are also only two generic ToolEntry types which
> also have to store parameters to pass to the generic model that they
> create.
>
> The palette represents an rdf schema, the diagram in the editor pane
> represents an rdf-file that is built from that schema.
>
> So i haven`t got many diffrent toolentry classes but only two with lots
> of parameters to store.
>
>
>
>> I am beginning to think that when you say palette you just mean
>> model. When we say palette here we mean a set of tools that are
>> displayed in a specific view. Such as, line draw tool, selection
>> tool, text tool, etc. When these are all put together in a sort of
>> tool bar, we call it a pallette.
>>
>> If you mean the storable class that gets written to and read from a
>> file, or some other storage medium, we call that the model.
>>
>> Is that consistent with what you are thinking?
>>
>>
>> Frank Dyck wrote:
>>
>>>
>>>>>> 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?
>>>>
>>>>
>>> Bound to the resource. There is only one type that my editor opens.
>>> I think i don`t understand the second question...
>>> My palette provides tools to generate 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?
>>>>
>>> Store the palette (the palette-model :-))
>>> Sorry about the misleading terms.
>>> I convert the gef-palette to an RDFModel object which i can
>>> read/write to a file.
>>>
>>>>> 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.
>>>>
>>> How do you setProperties of a Resource?
>>> I`m a complete newbie to this.
>>> I just added the example extension PropertyPage and looked at it a bit.
>>> As far as i see it without the property page i would do something
>>> like this,
>>> where i normally write the palette to a file:
>>> ResourcesPlugin.getWorkspace().getRoot().setPersistentProper ty(
>>> new QualifiedName("", PALETTE_PROPERTY),
>>> someShortStringValue);
>>> Where the value should be representing the palette.
>>> But setPersistentProperty says to store short strings as values.
>>> I want to store an object of the type RDFModel.
>>> I mean i can convert it to a String but it won`t be under 2KB short!
>>>
>>>>> 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?
>>>
>>> :-) It`s pretty confusing/misleading.
>>> I convert the palette to an rdf-model-object(from jena). So that is
>>> what i want to store.
>>> (I want to be able to export it later and can already read in
>>> palettes from rdf files.)
>>
>>
>>
>


--
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
Previous Topic:SelectAction constructor deprecated -- what to use instead?
Next Topic:Open GEF Editor Programmatically
Goto Forum:
  


Current Time: Wed Jul 16 22:48:17 EDT 2025

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

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

Back to the top