Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Wizard launch
Wizard launch [message #233943] Wed, 17 June 2009 12:40 Go to next message
Charles SOUILLARD is currently offline Charles SOUILLARDFriend
Messages: 12
Registered: July 2009
Junior Member
Hi all,

I want to launch a wizard when a button is selected. My button is defined
in a Section of my properties view. Can you tell me which code I need to
execute to launch the wizard ?

My wizard is a copy/paste of the example here :
http://www.vogella.de/articles/RichClientPlatform/article.ht ml#wizards

Button createConnectorButton = getWidgetFactory().createButton(composite,
Messages.ConnectorsSection_Add_Connector, SWT.PUSH);

createConnectorButton.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent event) {
?????
}
);
Regards
Charles
Re: Wizard launch [message #233951 is a reply to message #233943] Wed, 17 June 2009 12:52 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Hi Charles,

I suppose it should look like this:

MyWizard wizard = new MyWizard();

WizardDialog dialog = new WizardDialog(
Display.getDefault().getActiveShell(), wizard);
dialog.create();

if ( dialog.open() == Window.OK ) {
//
}

Regards, Peter


> I want to launch a wizard when a button is selected. My button is defined
> in a Section of my properties view. Can you tell me which code I need to
> execute to launch the wizard ?

> My wizard is a copy/paste of the example here :
> http://www.vogella.de/articles/RichClientPlatform/article.ht ml#wizards

> Button createConnectorButton = getWidgetFactory().createButton(composite,
> Messages.ConnectorsSection_Add_Connector, SWT.PUSH);

> createConnectorButton.addSelectionListener(new SelectionAdapter(){
> public void widgetSelected(SelectionEvent event) {
> ?????
> }
> );
> Regards
> Charles
Re: Wizard launch [message #233958 is a reply to message #233951] Wed, 17 June 2009 13:31 Go to previous messageGo to next message
Charles SOUILLARD is currently offline Charles SOUILLARDFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks, it works. I was trying to use commands and handlers as I have seen
these methods onthe net...

This simple way works so it is sufficient for me now. Do you know what is
the goal of Commands and handlers ?

Thanks,
Charles
Re: Wizard launch [message #233981 is a reply to message #233958] Wed, 17 June 2009 13:42 Go to previous message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
> This simple way works so it is sufficient for me now. Do you know what is
> the goal of Commands and handlers ?
Sorry, no idea ;-)

Btw, here's another great tutorial for wizards:
http://www.eclipse.org/articles/article.php?file=Article-JFa ceWizards/index.html

Regards, Peter
Previous Topic:EMF / GMF : sharing Editing Domain
Next Topic:Question about linked emf and gmf editors
Goto Forum:
  


Current Time: Fri Apr 19 20:39:28 GMT 2024

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

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

Back to the top