Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [eclipse plugin ] implement a class to handel a command (command that opens a new wizard dialog page )
[eclipse plugin ] implement a class to handel a command [message #549631] Tue, 27 July 2010 12:20 Go to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 34
Registered: July 2010
Member
hello,

I've added a command on the menu when I right click with the mouse on a file .
What I want to do now is to control the action when I select the command from the menu .

In fact I need to open a new wizard dialog page that I will configure with SWT.designer
I created a new class for my handler but I don't know how to open a wizard dialog page from this class here is the code

public class Deliverhandler extends AbstractHandler {

        public Object execute(ExecutionEvent event) throws ExecutionException {
                /*
                 */        
        return null;
                
        }
}


thanks in advance for your help
Re: [eclipse plugin ] implement a class to handel a command [message #549920 is a reply to message #549631] Wed, 28 July 2010 13:08 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 27.07.2010 14:20, emna.lamine@ensi-bourges.fr wrote:
> hello,
>
> I've added a command on the menu when I right click with the mouse on a
> file .
> What I want to do now is to control the action when I select the command
> from the menu .
>
> In fact I need to open a new wizard dialog page that I will configure
> with SWT.designer I created a new class for my handler but I don't know
> how to open a wizard dialog page from this class here is the code
> public class Deliverhandler extends AbstractHandler {
>
> public Object execute(ExecutionEvent event) throws ExecutionException {
> /*
> */ return null;
> }
> }
>
> thanks in advance for your help

It is not clear to me what your specific problem is. The following
jface snippet shows how to start a wizard

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.s nippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippet s/wizard/Snippet047WizardWithLongRunningOperation.java?view= markup

Within AbstractHandler.execute you can use from helper class HandlerUtil
the static method

Shell getActiveShell[Checked](ExecutionEvent event)

to get the necessary shell.

HTH & Greetings from Bremen,

Daniel Krügler
Re: [eclipse plugin ] implement a class to handel a command [message #550493 is a reply to message #549631] Fri, 30 July 2010 14:33 Go to previous message
Eclipse User is currently offline Eclipse UserFriend
Messages: 34
Registered: July 2010
Member
hello !!

thanks so much for your answer it is exactly what I'm looking for

Very Happy
Previous Topic:FormText lacks a getter for the text
Next Topic:Unable to control editor tab size in 3.6
Goto Forum:
  


Current Time: Thu Mar 28 12:52:32 GMT 2024

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

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

Back to the top