diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:23:09 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:24:09 +0200 |
commit | c7da892cb23d50d4d85746c9a0b6b14bf570989d (patch) | |
tree | e7136073f386d6156f51766c498c52c30c8df85f /plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java | |
download | eclipse-poky-kepler-c7da892cb23d50d4d85746c9a0b6b14bf570989d.tar.gz |
initial commit for Enea Linux 4.0daisy
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java')
-rw-r--r-- | plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java new file mode 100644 index 0000000..d30d37b --- /dev/null +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/actions/LaunchNewRecipeWizardAction.java | |||
@@ -0,0 +1,48 @@ | |||
1 | /***************************************************************************** | ||
2 | * Copyright (c) 2009 Ken Gilmer | ||
3 | * All rights reserved. This program and the accompanying materials | ||
4 | * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | * which accompanies this distribution, and is available at | ||
6 | * http://www.eclipse.org/legal/epl-v10.html | ||
7 | * | ||
8 | * Contributors: | ||
9 | * Ken Gilmer - initial API and implementation | ||
10 | *******************************************************************************/ | ||
11 | package org.yocto.bc.ui.actions; | ||
12 | |||
13 | import org.eclipse.jface.action.IAction; | ||
14 | import org.eclipse.jface.viewers.ISelection; | ||
15 | import org.eclipse.jface.viewers.IStructuredSelection; | ||
16 | import org.eclipse.jface.wizard.WizardDialog; | ||
17 | import org.eclipse.ui.IWorkbenchWindow; | ||
18 | import org.eclipse.ui.IWorkbenchWindowActionDelegate; | ||
19 | |||
20 | import org.yocto.bc.ui.wizards.NewBitBakeFileRecipeWizard; | ||
21 | |||
22 | public class LaunchNewRecipeWizardAction implements IWorkbenchWindowActionDelegate { | ||
23 | |||
24 | private IWorkbenchWindow window; | ||
25 | private IStructuredSelection selection; | ||
26 | |||
27 | public void dispose() { | ||
28 | } | ||
29 | |||
30 | public void init(IWorkbenchWindow window) { | ||
31 | this.window = window; | ||
32 | } | ||
33 | |||
34 | public void run(IAction action) { | ||
35 | NewBitBakeFileRecipeWizard wizard = new NewBitBakeFileRecipeWizard(); | ||
36 | |||
37 | wizard.init(window.getWorkbench(), selection); | ||
38 | WizardDialog wd = new WizardDialog(window.getShell(), wizard); | ||
39 | wd.create(); | ||
40 | wd.open(); | ||
41 | } | ||
42 | |||
43 | public void selectionChanged(IAction action, ISelection selection) { | ||
44 | if (selection instanceof IStructuredSelection) { | ||
45 | this.selection = (IStructuredSelection) selection; | ||
46 | } | ||
47 | } | ||
48 | } \ No newline at end of file | ||