Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Calling a Wizard from a button(start a wizard by pressing a toolbar button)
Calling a Wizard from a button [message #648520] Thu, 13 January 2011 06:09 Go to next message
Martin F.
Messages: 12
Registered: January 2011
Junior Member
Hello,

I've managed to add a toolbar button to my Plugin-Project and successfully associated an action with it. (runs fine)
I also created a wizard which is accessible via the File => New menu-options. (runs fine, too)
Now I'm trying to associate the button with the event of starting the wizard but I'm completely lost which kind of "action" needs to be called to start the wizard as this seems hidden for me what Eclipse is doing when calling a wizard by the menu. Is there any way to tell Eclipse "do whatever you do when opening a wizard via File => New => "Name of Wizard" by pressing this button?
kind regards


PS: using Eclipse 3.5.1, programming done in Java on WinXP (but is supposed to run under Linux as well)

[Updated on: Thu, 13 January 2011 06:28]

Report message to a moderator

Re: Calling a Wizard from a button [message #648704 is a reply to message #648520] Fri, 14 January 2011 02:08 Go to previous message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
On 13/01/11 4:39 PM, mtchr@schmusemail.de wrote:
> Hello,
>
> I've managed to add a toolbar button to my Plugin-Project and
> successfully associated an action with it. (runs fine)
> I also created a wizard which is accessible via the File => New
> menu-options. (runs fine, too)
> Now I'm trying to associate the button with the event of starting the
> wizard but I'm completely lost which kind of "action" needs to be called
> to start the wizard as this seems hidden for me what Eclipse is doing
> when calling a wizard by the menu. Is there any way to tell Eclipse "do
> whatever you do when opening a wizard via File => New => "Name of
> Wizard" by pressing this button?
> kind regards
>

You need to execute the command with the id "org.eclipse.ui.newWizard"
and pass the right parameter. See
http://eclipse-tips.com/tips/37-contributing-workbench-wizar ds-thru-commands

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Previous Topic:Problem with contributing to Eclipse Search menu
Next Topic:Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
Goto Forum:
  


Current Time: Sat Apr 19 08:51:34 EDT 2014

Powered by FUDForum. Page generated in 0.02251 seconds