[yocto] [PATCHv2 8/8] plugins/sdk.ide: Add project configuration button
Timo Mueller
mail at timomueller.eu
Fri Jun 21 05:44:47 PDT 2013
From: Timo Mueller <timo.mueller at bmw-carit.de>
This changes the behaviour of the project specific profile button. If
the project specific profile is not yet defined for the selected
project, the list will contain a button to open the project
preferences instead of the greying out the button.
Signed-off-by: Timo Mueller <timo.mueller at bmw-carit.de>
---
plugins/org.yocto.sdk.ide/plugin.xml | 4 ----
.../src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java | 8 +++++---
.../src/org/yocto/sdk/ide/YoctoSDKMessages.properties | 1 +
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml
index c082c3a..04ed40e 100644
--- a/plugins/org.yocto.sdk.ide/plugin.xml
+++ b/plugins/org.yocto.sdk.ide/plugin.xml
@@ -81,10 +81,6 @@
id="org.yocto.sdk.ide.command.reconfigYocto"
name="%command.name">
</command>
- <command
- id="org.yocto.sdk.ide.command.disabled"
- name="DisabledCommand">
- </command>
</extension>
<extension
point="org.eclipse.ui.handlers">
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java
index 41374a6..13e0e7a 100644
--- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java
@@ -27,9 +27,11 @@ import org.yocto.sdk.ide.actions.ProfileSwitchHandler;
import org.yocto.sdk.ide.utils.ProjectPreferenceUtils;
public class ProjectSpecificContributionItem extends TargetProfileContributionItem {
+ private static final String CONFIGURE_PROJECT_SPECIFIC_PROFILE =
+ "Preferences.Profile.ProjectSpecific.Configure.Label"; //$NON-NLS-N$
private static final String PROJECT_SPECIFIC_PROFILE =
"Preferences.Profile.ProjectSpecific.Profile.Label"; //$NON-NLS-N$
- private static final String DISABLED_COMMAND_ID = "org.yocto.sdk.ide.command.disabled"; //$NON-NLS-N$
+ private static final String RECONFIG_YOCTO_COMMAND_ID = "org.yocto.sdk.ide.command.reconfigYocto"; //$NON-NLS-N$
private IServiceLocator serviceLocator;
@@ -50,10 +52,10 @@ public class ProjectSpecificContributionItem extends TargetProfileContributionIt
if ((result != SDKCheckResults.SDK_PASS)) {
CommandContributionItemParameter parameter = new CommandContributionItemParameter(serviceLocator,
null,
- DISABLED_COMMAND_ID,
+ RECONFIG_YOCTO_COMMAND_ID,
CommandContributionItem.STYLE_PUSH);
- parameter.label = YoctoSDKMessages.getString(PROJECT_SPECIFIC_PROFILE);
+ parameter.label = YoctoSDKMessages.getString(CONFIGURE_PROJECT_SPECIFIC_PROFILE);
items.add(new CommandContributionItem(parameter));
} else {
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties
index e71b7dd..f545c2b 100644
--- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties
@@ -89,6 +89,7 @@ Preferences.Profile.Standard.Modification.Message = Standard cross development p
Preferences.Profile.ProjectSpecific.Title = Use project specific settings
Preferences.Profile.ProjectSpecific.Group.Title = Project specific settings:
Preferences.Profile.ProjectSpecific.Profile.Label = Project specific profile
+Preferences.Profile.ProjectSpecific.Configure.Label = Configure project specific profile ...
Preferences.Profile.ProjectSpecific.Error.Title = Could not change to project specific target profile
Preferences.Profile.ProjectSpecific.Error.Message = The project specific target profile is not defined for the project "{0}".\nYou can define it in the project's property page.
--
1.8.1.4
More information about the yocto
mailing list