diff options
author | Thomas Cicognani | 2014-08-26 09:27:39 +0000 |
---|---|---|
committer | Thomas Cicognani | 2015-06-25 12:51:10 +0000 |
commit | 234b049b9783615d5cbaddccd0aed9c01e5d2196 (patch) | |
tree | b01cc652b5797a27fe76e0c0fd6eae2848f506d3 | |
parent | 684be5e6707f6a26d08e9d03755ed191613d77bb (diff) | |
download | org.eclipse.modisco-234b049b9783615d5cbaddccd0aed9c01e5d2196.tar.gz org.eclipse.modisco-234b049b9783615d5cbaddccd0aed9c01e5d2196.tar.xz org.eclipse.modisco-234b049b9783615d5cbaddccd0aed9c01e5d2196.zip |
Bug 470962 - Add shortcuts to activate customs
Change-Id: I021a8815419ab4b2beb62aa33c4238f306a19a33
Signed-off-by: Thomas Cicognani <tcicognani@sodifrance.fr>
6 files changed, 158 insertions, 4 deletions
diff --git a/org.eclipse.modisco.infra.browser.editor.ui/OSGI-INF/l10n/bundle.properties b/org.eclipse.modisco.infra.browser.editor.ui/OSGI-INF/l10n/bundle.properties index 3a8219c89..18305e537 100644 --- a/org.eclipse.modisco.infra.browser.editor.ui/OSGI-INF/l10n/bundle.properties +++ b/org.eclipse.modisco.infra.browser.editor.ui/OSGI-INF/l10n/bundle.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2014 Soft-Maint.
+# Copyright (c) 2014, 2015 Soft-Maint.
# 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
@@ -10,6 +10,7 @@ # Thomas Cicognani (Soft-Maint) - Bug 442718 - Implement copy action in the new MoDisco Browser
# Thomas Cicognani (Soft-Maint) - Bug 442714 - New toolbar action to show/hide eContainer link
# Grégoire Dupé (Mia-Software) - Bug 469263 - [Unit Test Failure] org.eclipse.modisco.tests.BundleTest.name
+# Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs
#Properties file for org.eclipse.emf.facet.widgets.tree.ui.workbench
Bundle-Vendor = Eclipse Modeling Project
Bundle-Name = MoDisco Tree Widgets (Incubation)
@@ -17,6 +18,8 @@ TreeResourceEditor = Tree Resource Editor modiscoBrowserToolbarLabel = MoDisco Browser
LoadUnloadFacets = Load/Unload facets
LoadUnloadCustoms = Load/Unload customizations
-ShowLinksLabel = Show number of links
+ShowLinksLabel = Show number of links ShowEContainerLabel = Show eContainer link
-CopyLabel = Copy
+CopyLabel = Copy +HideEmptyReferences = Hide empty references
+HideDerivedReferences = Hide derived references diff --git a/org.eclipse.modisco.infra.browser.editor.ui/plugin.xml b/org.eclipse.modisco.infra.browser.editor.ui/plugin.xml index be42bb4d2..14d73c517 100644 --- a/org.eclipse.modisco.infra.browser.editor.ui/plugin.xml +++ b/org.eclipse.modisco.infra.browser.editor.ui/plugin.xml @@ -13,7 +13,8 @@ Thomas Cicognani (Soft-Maint) - Bug 442257 - New toolbar actions to (des)activate customizations Thomas Cicognani (Soft-Maint) - Bug 442718 - Implement copy action in the new MoDisco Browser
Thomas Cicognani (Soft-Maint) - Bug 442714 - New toolbar action to show/hide eContainer link - Thomas Cicognani (Soft-Maint) - Bug 442800 - API to open new MoDisco Browser + Thomas Cicognani (Soft-Maint) - Bug 442800 - API to open new MoDisco Browser
+ Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs -->
<plugin>
<extension point="org.eclipse.ui.editors">
@@ -105,6 +106,34 @@ </with>
</visibleWhen>
</command>
+ <command
+ commandId="org.eclipse.modisco.infra.browser.editor.ui.command.hideemptyreferences"
+ label="%HideEmptyReferences"
+ style="toggle">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.modisco.infra.browser.editor.ui.internal.editor.TreeEditor">
+ </instanceof>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.modisco.infra.browser.editor.ui.command.hidederivedreferences"
+ label="%HideDerivedReferences"
+ style="toggle">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.modisco.infra.browser.editor.ui.internal.editor.TreeEditor">
+ </instanceof>
+ </with>
+ </visibleWhen>
+ </command>
</toolbar>
</menuContribution>
<menuContribution
@@ -115,6 +144,16 @@ label="%ShowLinksLabel"
style="toggle">
</command>
+ <command
+ commandId="org.eclipse.modisco.infra.browser.editor.ui.command.hideemptyreferences"
+ label="%HideEmptyReferences"
+ style="toggle">
+ </command>
+ <command
+ commandId="org.eclipse.modisco.infra.browser.editor.ui.command.hidederivedreferences"
+ label="%HideDerivedReferences"
+ style="toggle">
+ </command>
</menuContribution>
<menuContribution
allPopups="true"
@@ -146,6 +185,24 @@ id="org.eclipse.ui.commands.toggleState">
</state>
</command>
+ <command
+ defaultHandler="org.eclipse.modisco.infra.browser.editor.ui.internal.handlers.HideEmptyReferencesHandler"
+ id="org.eclipse.modisco.infra.browser.editor.ui.command.hideemptyreferences"
+ name="%HideEmptyReferences">
+ <state
+ class="org.eclipse.modisco.infra.browser.editor.ui.internal.handlers.HideEmptyReferencesToggleState"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
+ <command
+ defaultHandler="org.eclipse.modisco.infra.browser.editor.ui.internal.handlers.HideDerivedReferencesHandler"
+ id="org.eclipse.modisco.infra.browser.editor.ui.command.hidederivedreferences"
+ name="%HideDerivedReferences">
+ <state
+ class="org.eclipse.modisco.infra.browser.editor.ui.internal.handlers.HideDerivedReferencesToggleState"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
</extension>
<extension
point="org.eclipse.ui.handlers">
diff --git a/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesHandler.java b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesHandler.java new file mode 100644 index 000000000..b8cee442d --- /dev/null +++ b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesHandler.java @@ -0,0 +1,25 @@ +/**
+ * Copyright (c) 2015 Soft-Maint.
+ * 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:
+ * Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs
+ */
+package org.eclipse.modisco.infra.browser.editor.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class HideDerivedReferencesHandler extends
+ AbstractFacetSetActivatorHandler {
+
+ private static final String CUSTOM_ID = "org.eclipse.modisco.infra.browser.ecore.core.hideDerivedReferences"; //$NON-NLS-1$
+
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ return execute(event, CUSTOM_ID);
+ }
+
+}
diff --git a/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesToggleState.java b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesToggleState.java new file mode 100644 index 000000000..b62402526 --- /dev/null +++ b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideDerivedReferencesToggleState.java @@ -0,0 +1,22 @@ +/**
+ * Copyright (c) 2015 Soft-Maint.
+ * 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:
+ * Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs
+ */
+package org.eclipse.modisco.infra.browser.editor.ui.internal.handlers;
+
+public class HideDerivedReferencesToggleState extends
+ AbstractFacetSetActivatorToggleState {
+
+ private static final String CUSTOM_ID = "org.eclipse.modisco.infra.browser.ecore.core.hideDerivedReferences"; //$NON-NLS-1$
+
+ public HideDerivedReferencesToggleState() {
+ super(CUSTOM_ID);
+ }
+
+}
diff --git a/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesHandler.java b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesHandler.java new file mode 100644 index 000000000..b026ddfc5 --- /dev/null +++ b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesHandler.java @@ -0,0 +1,25 @@ +/**
+ * Copyright (c) 2015 Soft-Maint.
+ * 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:
+ * Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs
+ */
+package org.eclipse.modisco.infra.browser.editor.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class HideEmptyReferencesHandler extends
+ AbstractFacetSetActivatorHandler {
+
+ private static final String CUSTOM_ID = "org.eclipse.modisco.infra.browser.ecore.core.hideEmptyReferences"; //$NON-NLS-1$
+
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ return execute(event, CUSTOM_ID);
+ }
+
+}
diff --git a/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesToggleState.java b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesToggleState.java new file mode 100644 index 000000000..e8bfcadba --- /dev/null +++ b/org.eclipse.modisco.infra.browser.editor.ui/src/org/eclipse/modisco/infra/browser/editor/ui/internal/handlers/HideEmptyReferencesToggleState.java @@ -0,0 +1,22 @@ +/**
+ * Copyright (c) 2015 Soft-Maint.
+ * 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:
+ * Thomas Cicognani (Soft-Maint) - Bug 470962 - Add shortcuts to activate customs
+ */
+package org.eclipse.modisco.infra.browser.editor.ui.internal.handlers;
+
+public class HideEmptyReferencesToggleState extends
+ AbstractFacetSetActivatorToggleState {
+
+ private static final String CUSTOM_ID = "org.eclipse.modisco.infra.browser.ecore.core.hideEmptyReferences"; //$NON-NLS-1$
+
+ public HideEmptyReferencesToggleState() {
+ super(CUSTOM_ID);
+ }
+
+}
|