Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2012-05-02 16:41:23 +0000
committerBrian de Alwis2012-05-02 16:41:23 +0000
commit91ad0a19b056e0a07344f58497c4564a522496b5 (patch)
tree5ea4cfd52e2aa95627729fa42bb57ea423885241
parentfcb0517fb62a8d570aaca0352bb973988b681031 (diff)
downloadorg.eclipse.e4.tools-I20120503-2200.tar.gz
org.eclipse.e4.tools-I20120503-2200.tar.xz
org.eclipse.e4.tools-I20120503-2200.zip
Bug 376475 - [CSSSpy] processor causes duplicate Copy keybindingv20120502-1641I20120503-2200I20120502-2100
Add code to correct existig installations by checking for and removing the incorrect binding table.
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/SpyInstaller.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/SpyInstaller.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/SpyInstaller.java
index 510ad1dc..4ea90037 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/SpyInstaller.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/SpyInstaller.java
@@ -37,6 +37,9 @@ public class SpyInstaller {
@Execute
public void execute() {
+ // rectify situation introduced by bug 376475
+ removeBindingTable("bt.org.eclipse.e4.css.OpenSpy");
+
MCommand openSpyCommand = installCommand("Open CSS Spy",
OPEN_SPY_COMMAND_ID);
installHandler(openSpyCommand, SPY_HANDLER_ID, SPY_HANDLER_URI);
@@ -50,6 +53,15 @@ public class SpyInstaller {
openScratchpadCommand, "M1+M2+M3+F4");
}
+ private void removeBindingTable(String tableId) {
+ for (MBindingTable table : app.getBindingTables()) {
+ if (tableId.equals(table.getElementId())) {
+ app.getBindingTables().remove(table);
+ return;
+ }
+ }
+ }
+
private MCommand installCommand(String label, String commandId) {
for(MCommand cmd : app.getCommands()) {
if (commandId.equals(cmd.getElementId())) {

Back to the top