Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » savestate or how to store plugininformations
savestate or how to store plugininformations [message #250850] Wed, 09 June 2004 05:21 Go to next message
Eclipse UserFriend
Originally posted by: g.esch.euro1.ag

Hi,


Started plugin development few days ago, so dont shoot me. I tried writing
a ViewPart und placed some DirectoryFieldEditors within. Works fine, but i
want to keep selected Information persistent for further use. I tested the
saveState, init functionality and get closer with it. But its only stored
when closing workspace. This function is not used when only the plugin is
closed. Think it cant be the right way to write my own memento
implementation to store the data in own proprties file when view is
disposed.

iam pleased for all suggestions...

greets

Guido
Re: savestate or how to store plugininformations [message #250956 is a reply to message #250850] Wed, 09 June 2004 10:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

First plugins aren't typically closed. They are just code. They stay
active. (Though OSGi provides capabilities to "close" a plugin, that
isn't really done yet by most plugins). I think what you mean is your
view is closed, not the plugin.

Typically the memento is used to store things like what object was
selected when the workbench was shutdown, what trees were expanded,
things like that. They are meant to restore that particular instance of
the view (since they may be more than one of that type of view open in
different workbench pages) when the workbench is reopened. If you close
the view explicitly, that kind of information typically doesn't make
sense to store.

There other settings are basically global for a view type, like I want
the trees to always expand. Those are typically for all views of the
same type. They are stored in the plugin's preferences and used when the
view is opened.


--
Thanks, Rich Kulp

Re: savestate or how to store plugininformations [message #251381 is a reply to message #250956] Thu, 10 June 2004 05:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.esch.euro1.ag

Hi,

your are right, i only want to close the view, not the whole plugin. But
from my side, i cant understand why data isnt stored when closing the
view.
i try to give you a view of my plans. I want to write some clients to help
my in my development process. Need them for controlling serverarchitecture
and so on. My idea is writing some plugins with diffrent views for my
diffrent usecases. In this case i have to take the way over show view to
select the client i need at the moment. Later i want to get rid of my view
to clean the normal development perspective and press the close view
button. Maybe my design is crap or i dont get the right way to use this
views. For my first plugin
iam using some DirectoryEditors to select 4 deffrent pathes. And the right
way for this is storing a default path in preferences. The only thing i
want is allways remebering my Pathes i have selected earlier anyhow the
view is closed or the workbench is closed. I can understand the idea for
mementos storing "states" for all the views. But why is closing a view not
a point to save the state for this view.

Sorry for beeing little pain in .....:-)

ty for your patience,

regards

Guido
Re: savestate or how to store plugininformations [message #251459 is a reply to message #251381] Thu, 10 June 2004 10:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Because when the "view" is reopened how do you know which memento to
use? You can have more than one view, you can have more than one
workbench window. If you closed it on one window but opened it on
another, does the memento apply to the other one? When do you get rid of
a memento? It could hang around forever because it doesn't know when it
might ever be opened again. Does each workbench window keep a set of
mementos hanging around for all the views that were ever opened in that
window? Also the state of workbench may be entirely different the next
time the view is opened. Do the mementos still make sense? When you save
a memento on shutdown, you are assured that the state of the workbench
hasn't changed when brought back up.

So for anything other than shutdown, you are responsible for deciding
what to save and where to save it. You can use the plugin preferences
store for this.

But from your description it sounds more like you are creating
preferences instead of a view. In that case you should be a property
page instead of a view.

Guido Esch wrote:

> Hi,
>
> your are right, i only want to close the view, not the whole plugin. But
> from my side, i cant understand why data isnt stored when closing the
> view.
> i try to give you a view of my plans. I want to write some clients to help
> my in my development process. Need them for controlling serverarchitecture
> and so on. My idea is writing some plugins with diffrent views for my
> diffrent usecases. In this case i have to take the way over show view to
> select the client i need at the moment. Later i want to get rid of my view
> to clean the normal development perspective and press the close view
> button. Maybe my design is crap or i dont get the right way to use this
> views. For my first plugin
> iam using some DirectoryEditors to select 4 deffrent pathes. And the right
> way for this is storing a default path in preferences. The only thing i
> want is allways remebering my Pathes i have selected earlier anyhow the
> view is closed or the workbench is closed. I can understand the idea for
> mementos storing "states" for all the views. But why is closing a view not
> a point to save the state for this view.
>
> Sorry for beeing little pain in .....:-)
>
> ty for your patience,
>
> regards
>
> Guido
>
>
>
>
>

--
Thanks, Rich Kulp

Re: savestate or how to store plugininformations [message #251492 is a reply to message #251459] Thu, 10 June 2004 11:18 Go to previous message
Eclipse UserFriend
Originally posted by: g.esch.euro1.ag

think i got it:-) trying to combine all your ideas to get a result i can
work with.

ty for open mind:-)

Guido

Rich Kulp wrote:

> Because when the "view" is reopened how do you know which memento to
> use? You can have more than one view, you can have more than one
> workbench window. If you closed it on one window but opened it on
> another, does the memento apply to the other one? When do you get rid of
> a memento? It could hang around forever because it doesn't know when it
> might ever be opened again. Does each workbench window keep a set of
> mementos hanging around for all the views that were ever opened in that
> window? Also the state of workbench may be entirely different the next
> time the view is opened. Do the mementos still make sense? When you save
> a memento on shutdown, you are assured that the state of the workbench
> hasn't changed when brought back up.

> So for anything other than shutdown, you are responsible for deciding
> what to save and where to save it. You can use the plugin preferences
> store for this.

> But from your description it sounds more like you are creating
> preferences instead of a view. In that case you should be a property
> page instead of a view.

> Guido Esch wrote:

> > Hi,
> >
> > your are right, i only want to close the view, not the whole plugin. But
> > from my side, i cant understand why data isnt stored when closing the
> > view.
> > i try to give you a view of my plans. I want to write some clients to help
> > my in my development process. Need them for controlling serverarchitecture
> > and so on. My idea is writing some plugins with diffrent views for my
> > diffrent usecases. In this case i have to take the way over show view to
> > select the client i need at the moment. Later i want to get rid of my view
> > to clean the normal development perspective and press the close view
> > button. Maybe my design is crap or i dont get the right way to use this
> > views. For my first plugin
> > iam using some DirectoryEditors to select 4 deffrent pathes. And the right
> > way for this is storing a default path in preferences. The only thing i
> > want is allways remebering my Pathes i have selected earlier anyhow the
> > view is closed or the workbench is closed. I can understand the idea for
> > mementos storing "states" for all the views. But why is closing a view not
> > a point to save the state for this view.
> >
> > Sorry for beeing little pain in .....:-)
> >
> > ty for your patience,
> >
> > regards
> >
> > Guido
> >
> >
> >
> >
> >
Previous Topic:Set selection programmatically
Next Topic:Problems with RC1, Java Compliance 1.4 and assert statements.
Goto Forum:
  


Current Time: Fri Jun 20 11:22:22 EDT 2025

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

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

Back to the top