Skip to content

Commit

Permalink
inicializacao do WizardDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jribacruz committed Jun 16, 2012
1 parent 93dc8f5 commit 5902aa8
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -2,19 +2,28 @@

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;

import smart.generator.plugin.core.ui.context.ApplicationContext;
import smart.generator.plugin.core.ui.wizards.GeneratorWizard;

import com.google.inject.Inject;

public class GeneratorCommand {

@Inject
private GeneratorWizard wizard;

@Inject
private ApplicationContext context;

public void execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
context.setSelection(window.getSelectionService().getSelection());
WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
dialog.create();
dialog.open();
}
}

0 comments on commit 5902aa8

Please sign in to comment.