diff options
author | Ken Gilmer <kgilmer@gmail.com> | 2010-05-18 21:53:22 -0400 |
---|---|---|
committer | Ken Gilmer <kgilmer@gmail.com> | 2010-05-18 21:53:22 -0400 |
commit | a7e84830627e50adac5c81ae4dad69aa350933fb (patch) | |
tree | 219aa86f4d5f03b29d7bc56f8cdba2702d67082c /org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java | |
parent | e27a6dcce13930bfa711a6e72992597a8d1d07c5 (diff) | |
download | eclipsetools-a7e84830627e50adac5c81ae4dad69aa350933fb.tar.gz |
org.openembedded.bc.ui: initial commit
Diffstat (limited to 'org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java')
-rw-r--r-- | org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java b/org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java new file mode 100644 index 0000000..f1f09f8 --- /dev/null +++ b/org.openembedded.bc.ui/src/org/openembedded/bc/ui/actions/LaunchNewRecipeWizardAction.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2009 Ken Gilmer + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Ken Gilmer - initial API and implementation + *******************************************************************************/ +package org.openembedded.bc.ui.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; +import org.openembedded.bc.ui.wizards.NewBitBakeFileRecipeWizard; + + +public class LaunchNewRecipeWizardAction implements IWorkbenchWindowActionDelegate { + + private IWorkbenchWindow window; + private IStructuredSelection selection; + + public void dispose() { + } + + public void init(IWorkbenchWindow window) { + this.window = window; + } + + public void run(IAction action) { + NewBitBakeFileRecipeWizard wizard = new NewBitBakeFileRecipeWizard(); + + wizard.init(window.getWorkbench(), selection); + WizardDialog wd = new WizardDialog(window.getShell(), wizard); + wd.create(); + wd.open(); + } + + public void selectionChanged(IAction action, ISelection selection) { + if (selection instanceof IStructuredSelection) { + this.selection = (IStructuredSelection) selection; + } + } +}
\ No newline at end of file |