Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » how to show something the first time you run a plugin
how to show something the first time you run a plugin [message #220687] Fri, 02 April 2004 09:16 Go to next message
Eclipse UserFriend
yeup!

i have seen in some plugins that the first time you run them, appears a
welcome page and in the new release of eclipse (M8) also appears a dialog
where we can insert the default workspace directory. ¿How can i do these
things in my plugin? i want to ask something with a dialog only the first
time. any indications of where to look?

thanks
Re: how to show something the first time you run a plugin [message #220717 is a reply to message #220687] Fri, 02 April 2004 10:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Typically it is stored in the plugin preferences (which you can get from
the plugin class). But if you do have this option, when you turn it off,
you need to have a preference page available in the Window->Preferences
dialog to turn it back on.



--
Thanks, Rich Kulp

Re: how to show something the first time you run a plugin [message #220772 is a reply to message #220717] Fri, 02 April 2004 11:16 Go to previous messageGo to next message
Eclipse UserFriend
> Typically it is stored in the plugin preferences (which you can get from
> the plugin class). But if you do have this option, when you turn it off,
> you need to have a preference page available in the Window->Preferences
> dialog to turn it back on.

thank you very much. I was thinking in creating a file in the plugin
directory by myself where i would save the properties i need. But this is
much better :-D

I have doubts of how to use this. I have put the following code in the
plugin constructor:

pref = this.getPluginPreferences();
if (pref.getBoolean("first")==false)
{
pref.setValue("first",true);
}else
{
//nothing
}

and if i restart the eclipse workbench always says that the value "first"
is false;

why is this?

thanks
Re: how to show something the first time you run a plugin [message #221174 is a reply to message #220772] Fri, 02 April 2004 18:00 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

By default plugin preferences aren't implicitly saved between sessions.
You need to call plugin.savePreferences() after you make the change.

--
Thanks, Rich Kulp

Previous Topic:resources [un]locking
Next Topic:Can't start Eclipse 3.0
Goto Forum:
  


Current Time: Sat Sep 13 17:00:27 EDT 2025

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

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

Back to the top