Skip to main content



      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
Eclipse UserFriend
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] by 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
Eclipse UserFriend
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: Thu Jul 03 12:13:00 EDT 2025

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

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

Back to the top