diff options
Diffstat (limited to 'plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ReconfigYoctoAction.java')
-rw-r--r-- | plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ReconfigYoctoAction.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ReconfigYoctoAction.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ReconfigYoctoAction.java new file mode 100644 index 0000000..e255fd1 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ReconfigYoctoAction.java | |||
@@ -0,0 +1,44 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010 Intel Corporation. | ||
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 | * Intel - initial API and implementation | ||
10 | *******************************************************************************/ | ||
11 | package org.yocto.sdk.ide.actions; | ||
12 | |||
13 | import org.eclipse.cdt.internal.autotools.ui.actions.InvokeAction; | ||
14 | import org.eclipse.core.resources.IContainer; | ||
15 | import org.eclipse.core.resources.IProject; | ||
16 | import org.eclipse.jface.action.IAction; | ||
17 | import org.eclipse.jface.preference.PreferenceDialog; | ||
18 | import org.eclipse.ui.dialogs.PreferencesUtil; | ||
19 | import org.yocto.sdk.ide.YoctoSDKPlugin; | ||
20 | |||
21 | |||
22 | @SuppressWarnings("restriction") | ||
23 | public class ReconfigYoctoAction extends InvokeAction { | ||
24 | |||
25 | public void run(IAction action) { | ||
26 | IContainer container = getSelectedContainer(); | ||
27 | if (container == null) | ||
28 | return; | ||
29 | |||
30 | IProject project = container.getProject(); | ||
31 | |||
32 | PreferenceDialog dialog = | ||
33 | PreferencesUtil.createPropertyDialogOn(YoctoSDKPlugin.getActiveWorkbenchShell(), | ||
34 | project, | ||
35 | "org.yocto.sdk.ide.page", | ||
36 | null, | ||
37 | null); | ||
38 | dialog.open(); | ||
39 | } | ||
40 | |||
41 | public void dispose() { | ||
42 | |||
43 | } | ||
44 | } | ||