Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-01-27 09:38:39 -0500
committerptessier2014-01-27 09:38:39 -0500
commit96651c4379b00c9cacc4026b7c1def0796d1df79 (patch)
treee399f227739419a4420715faa72ad9151e48b3e8 /plugins
parente58f0027ea4edf1ce9739fb99594723fcc0e62bf (diff)
parent61fe1560ac4f7d2d667c116648cbe5a2eb6a10ef (diff)
downloadorg.eclipse.papyrus-96651c4379b00c9cacc4026b7c1def0796d1df79.tar.gz
org.eclipse.papyrus-96651c4379b00c9cacc4026b7c1def0796d1df79.tar.xz
org.eclipse.papyrus-96651c4379b00c9cacc4026b7c1def0796d1df79.zip
Merge branch 'master' of ssh://ptessier@git.eclipse.org/gitroot/papyrus/org.eclipse.papyrus.git
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java63
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java12
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF8
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF2
4 files changed, 79 insertions, 6 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java
new file mode 100644
index 00000000000..794cbf5f2e6
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.configuration;
+
+import org.eclipse.nebula.widgets.nattable.config.AbstractUiBindingConfiguration;
+import org.eclipse.nebula.widgets.nattable.edit.action.CellEditDragMode;
+import org.eclipse.nebula.widgets.nattable.edit.action.KeyEditAction;
+import org.eclipse.nebula.widgets.nattable.edit.action.MouseEditAction;
+import org.eclipse.nebula.widgets.nattable.edit.config.DefaultEditBindings;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.painter.cell.CheckBoxPainter;
+import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.CellEditorMouseEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.CellPainterMouseEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.LetterOrDigitKeyEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher;
+import org.eclipse.swt.SWT;
+
+/**
+ *
+ * @author VL222926
+ * Copy of {@link DefaultEditBindings} excepted for edition on double click replacing edition on single click
+ */
+public class PapyrusDefaultEditBindings extends AbstractUiBindingConfiguration {
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.config.IConfiguration#configureUiBindings(org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry)
+ *
+ * @param uiBindingRegistry
+ */
+ @Override
+ public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
+ //configure the space key to activate a cell editor via keyboard
+ //this is especially useful for changing the value for a checkbox
+ uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, 32), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.F2), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(SWT.SHIFT), new KeyEditAction());
+
+ uiBindingRegistry.registerDoubleClickBinding(new CellEditorMouseEventMatcher(GridRegion.BODY), new MouseEditAction());
+
+ uiBindingRegistry.registerMouseDragMode(new CellEditorMouseEventMatcher(GridRegion.BODY), new CellEditDragMode());
+
+ uiBindingRegistry.registerFirstSingleClickBinding(new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, CheckBoxPainter.class), new MouseEditAction());
+
+ uiBindingRegistry.registerFirstMouseDragMode(new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, CheckBoxPainter.class), new CellEditDragMode());
+
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
index 13506c41440..32c99976c25 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
@@ -47,8 +47,18 @@ public class PapyrusGridLayerConfiguration extends DefaultGridLayerConfiguration
/**
*
+ * @see org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultGridLayerConfiguration#addEditingUIConfig()
+ *
+ */
+ @Override
+ protected void addEditingUIConfig() {
+ addConfiguration(new PapyrusDefaultEditBindings());
+ }
+
+ /**
+ *
* @see org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultGridLayerConfiguration#addExcelExportUIBindings()
- *
+ *
*/
@Override
protected void addExcelExportUIBindings() {
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
index 37cabf42721..079af80d234 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
@@ -11,13 +11,13 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.ecore,
org.eclipse.osgi,
org.eclipse.emf.ecore.xmi,
- org.eclipse.papyrus.infra.queries.core.configuration;visibility:=reexport,
- org.eclipse.papyrus.infra.extendedtypes;visibility:=reexport,
+ org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.0.0",
org.eclipse.emf.transaction,
org.eclipse.gmf.runtime.emf.type.core,
- org.eclipse.papyrus.infra.services.edit,
- org.eclipse.papyrus.infra.gmfdiag.commands
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.papyrus.infra.newchild,
org.eclipse.papyrus.infra.newchild.ElementCreationMenuModel,
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
index 90dd017ceb7..9a13baf6c69 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
@@ -51,7 +51,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.navigation;bundle-version="1.0.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier

Back to the top