Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2013-04-17 21:28:36 +0000
committerTom Schindl2013-04-17 21:28:36 +0000
commit85e724e16cddcade4eb0ba43d9ae5cc7b59b25fa (patch)
tree420945422d035cea84fee700bccce1df895a9e6f
parenta6d6c71b78dbbf9b594eefb6366b500032c1e94c (diff)
downloadorg.eclipse.efxclipse-85e724e16cddcade4eb0ba43d9ae5cc7b59b25fa.tar.gz
org.eclipse.efxclipse-85e724e16cddcade4eb0ba43d9ae5cc7b59b25fa.tar.xz
org.eclipse.efxclipse-85e724e16cddcade4eb0ba43d9ae5cc7b59b25fa.zip
initial checkin
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.classpath7
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.gitignore2
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.project28
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.resources.prefs2
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.runtime.prefs2
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/META-INF/MANIFEST.MF15
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/build.properties4
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/pom.xml34
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Binding.java27
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyBinding.java15
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyLookup.java484
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeySequence.java17
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyStroke.java23
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/ParseException.java24
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Trigger.java15
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/TriggerSequence.java24
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/service/BindingFactory.java33
-rwxr-xr-xreleng/org.eclipse.fx.releng/pom.xml3
19 files changed, 766 insertions, 0 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.classpath b/bundles/runtime/org.eclipse.fx.ui.keybindings/.classpath
new file mode 100755
index 000000000..b1dabee38
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.gitignore b/bundles/runtime/org.eclipse.fx.ui.keybindings/.gitignore
new file mode 100755
index 000000000..4dc009173
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.gitignore
@@ -0,0 +1,2 @@
+/target
+/bin
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.project b/bundles/runtime/org.eclipse.fx.ui.keybindings/.project
new file mode 100755
index 000000000..fdbb01fbe
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.fx.ui.keybindings</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.resources.prefs b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 000000000..99f26c020
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.runtime.prefs b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 000000000..deae05a97
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\r\n
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.jdt.core.prefs b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 000000000..f42de363a
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.ui.keybindings/META-INF/MANIFEST.MF
new file mode 100755
index 000000000..0cc78dac3
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Bindings
+Bundle-SymbolicName: org.eclipse.fx.ui.keybindings
+Bundle-Version: 0.8.1.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.core.commands;bundle-version="3.6.0",
+ org.eclipse.e4.core.contexts;bundle-version="1.1.0",
+ org.eclipse.e4.core.di;bundle-version="1.1.0",
+ org.eclipse.osgi;bundle-version="3.7.0"
+Import-Package: javax.annotation;version="1.0.0",
+ javax.inject;version="1.0.0"
+Export-Package: org.eclipse.fx.ui.keybindings,
+ org.eclipse.fx.ui.keybindings.service
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/build.properties b/bundles/runtime/org.eclipse.fx.ui.keybindings/build.properties
new file mode 100755
index 000000000..34d2e4d2d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/pom.xml b/bundles/runtime/org.eclipse.fx.ui.keybindings/pom.xml
new file mode 100755
index 000000000..7a0890037
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/pom.xml
@@ -0,0 +1,34 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <name>e(fx)clipse - Runtime - e4 - Keybinding system API</name>
+ <groupId>org.eclipse.fx</groupId>
+ <artifactId>org.eclipse.fx.ui.keybindings</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <parent>
+ <groupId>org.eclipse.fx</groupId>
+ <artifactId>releng</artifactId>
+ <relativePath>../../../releng/org.eclipse.fx.releng/pom.xml</relativePath>
+ <version>0.8.1-SNAPSHOT</version>
+ </parent>
+
+ <build>
+ <resources>
+ <!-- to ensure that the feature lookup of the ui test works -->
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>META-INF/</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Binding.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Binding.java
new file mode 100755
index 000000000..d7ec07bb9
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Binding.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+
+public interface Binding {
+
+ int SYSTEM = 0;
+ int USER = 1;
+
+ String getSchemeId();
+
+ TriggerSequence getTriggerSequence();
+
+ ParameterizedCommand getParameterizedCommand();
+
+ String getContextId();
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyBinding.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyBinding.java
new file mode 100755
index 000000000..675903b0d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyBinding.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public interface KeyBinding extends Binding {
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyLookup.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyLookup.java
new file mode 100755
index 000000000..fce535bdc
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyLookup.java
@@ -0,0 +1,484 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public interface KeyLookup {
+ /**
+ * The formal name of the 'Alt' key.
+ */
+ public static final String ALT_NAME = "ALT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Arrow Down' key.
+ */
+ public static final String ARROW_DOWN_NAME = "ARROW_DOWN"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Arrow Left' key.
+ */
+ public static final String ARROW_LEFT_NAME = "ARROW_LEFT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Arrow Right' key.
+ */
+ public static final String ARROW_RIGHT_NAME = "ARROW_RIGHT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Arrow Up' key.
+ */
+ public static final String ARROW_UP_NAME = "ARROW_UP"; //$NON-NLS-1$
+
+ /**
+ * An alternate name for the backspace key.
+ */
+ public static final String BACKSPACE_NAME = "BACKSPACE"; //$NON-NLS-1$
+
+ /**
+ * The formal name for the 'Break' key.
+ */
+ public static final String BREAK_NAME = "BREAK"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the backspace key.
+ */
+ public static final String BS_NAME = "BS"; //$NON-NLS-1$
+
+ /**
+ * The formal name for the 'Caps Lock' key.
+ */
+ public static final String CAPS_LOCK_NAME = "CAPS_LOCK"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Command' key.
+ */
+ public static final String COMMAND_NAME = "COMMAND"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the carriage return (U+000D)
+ */
+ public static final String CR_NAME = "CR"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Ctrl' key.
+ */
+ public static final String CTRL_NAME = "CTRL"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the delete (U+007F) key
+ */
+ public static final String DEL_NAME = "DEL"; //$NON-NLS-1$
+
+ /**
+ * An alternative name for the delete key.
+ */
+ public static final String DELETE_NAME = "DELETE"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'End' key.
+ */
+ public static final String END_NAME = "END"; //$NON-NLS-1$
+
+ /**
+ * An alternative name for the enter key.
+ */
+ public static final String ENTER_NAME = "ENTER"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the escape (U+001B) key.
+ */
+ public static final String ESC_NAME = "ESC"; //$NON-NLS-1$
+
+ /**
+ * An alternative name for the escape key.
+ */
+ public static final String ESCAPE_NAME = "ESCAPE"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F1' key.
+ */
+ public static final String F1_NAME = "F1"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F10' key.
+ */
+ public static final String F10_NAME = "F10"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F11' key.
+ */
+ public static final String F11_NAME = "F11"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F12' key.
+ */
+ public static final String F12_NAME = "F12"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F13' key.
+ */
+ public static final String F13_NAME = "F13"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F14' key.
+ */
+ public static final String F14_NAME = "F14"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F15' key.
+ */
+ public static final String F15_NAME = "F15"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F16' key.
+ *
+ * @since 3.6
+ */
+ public static final String F16_NAME = "F16"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F17' key.
+ *
+ * @since 3.6
+ */
+ public static final String F17_NAME = "F17"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F18' key.
+ *
+ * @since 3.6
+ */
+ public static final String F18_NAME = "F18"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F19' key.
+ *
+ * @since 3.6
+ */
+ public static final String F19_NAME = "F19"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F20' key.
+ *
+ * @since 3.6
+ */
+ public static final String F20_NAME = "F20"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F2' key.
+ */
+ public static final String F2_NAME = "F2"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F3' key.
+ */
+ public static final String F3_NAME = "F3"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F4' key.
+ */
+ public static final String F4_NAME = "F4"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F5' key.
+ */
+ public static final String F5_NAME = "F5"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F6' key.
+ */
+ public static final String F6_NAME = "F6"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F7' key.
+ */
+ public static final String F7_NAME = "F7"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F8' key.
+ */
+ public static final String F8_NAME = "F8"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'F9' key.
+ */
+ public static final String F9_NAME = "F9"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the form feed (U+000C) key.
+ */
+ public static final String FF_NAME = "FF"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Home' key.
+ */
+ public static final String HOME_NAME = "HOME"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Insert' key.
+ */
+ public static final String INSERT_NAME = "INSERT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the line feed (U+000A) key.
+ */
+ public static final String LF_NAME = "LF"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'M1' key.
+ */
+ public static final String M1_NAME = "M1"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'M2' key.
+ */
+ public static final String M2_NAME = "M2"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'M3' key.
+ */
+ public static final String M3_NAME = "M3"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'M4' key.
+ */
+ public static final String M4_NAME = "M4"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the null (U+0000) key.
+ */
+ public static final String NUL_NAME = "NUL"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'NumLock' key.
+ */
+ public static final String NUM_LOCK_NAME = "NUM_LOCK"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '0' key on the numpad.
+ */
+ public static final String NUMPAD_0_NAME = "NUMPAD_0"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '1' key on the numpad.
+ */
+ public static final String NUMPAD_1_NAME = "NUMPAD_1"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '2' key on the numpad.
+ */
+ public static final String NUMPAD_2_NAME = "NUMPAD_2"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '3' key on the numpad.
+ */
+ public static final String NUMPAD_3_NAME = "NUMPAD_3"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '4' key on the numpad.
+ */
+ public static final String NUMPAD_4_NAME = "NUMPAD_4"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '5' key on the numpad.
+ */
+ public static final String NUMPAD_5_NAME = "NUMPAD_5"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '6' key on the numpad.
+ */
+ public static final String NUMPAD_6_NAME = "NUMPAD_6"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '7' key on the numpad.
+ */
+ public static final String NUMPAD_7_NAME = "NUMPAD_7"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '8' key on the numpad.
+ */
+ public static final String NUMPAD_8_NAME = "NUMPAD_8"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '9' key on the numpad.
+ */
+ public static final String NUMPAD_9_NAME = "NUMPAD_9"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Add' key on the numpad.
+ */
+ public static final String NUMPAD_ADD_NAME = "NUMPAD_ADD"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Decimal' key on the numpad.
+ */
+ public static final String NUMPAD_DECIMAL_NAME = "NUMPAD_DECIMAL"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Divide' key on the numpad.
+ */
+ public static final String NUMPAD_DIVIDE_NAME = "NUMPAD_DIVIDE"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Enter' key on the numpad.
+ */
+ public static final String NUMPAD_ENTER_NAME = "NUMPAD_ENTER"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the '=' key on the numpad.
+ */
+ public static final String NUMPAD_EQUAL_NAME = "NUMPAD_EQUAL"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Multiply' key on the numpad.
+ */
+ public static final String NUMPAD_MULTIPLY_NAME = "NUMPAD_MULTIPLY"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Subtract' key on the numpad.
+ */
+ public static final String NUMPAD_SUBTRACT_NAME = "NUMPAD_SUBTRACT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Page Down' key.
+ */
+ public static final String PAGE_DOWN_NAME = "PAGE_DOWN"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Page Up' key.
+ */
+ public static final String PAGE_UP_NAME = "PAGE_UP"; //$NON-NLS-1$
+
+ /**
+ * The formal name for the 'Pause' key.
+ */
+ public static final String PAUSE_NAME = "PAUSE"; //$NON-NLS-1$
+
+ /**
+ * The formal name for the 'Print Screen' key.
+ */
+ public static final String PRINT_SCREEN_NAME = "PRINT_SCREEN"; //$NON-NLS-1$
+
+ /**
+ * An alternative name for the enter key.
+ */
+ public static final String RETURN_NAME = "RETURN"; //$NON-NLS-1$
+
+ /**
+ * The formal name for the 'Scroll Lock' key.
+ */
+ public static final String SCROLL_LOCK_NAME = "SCROLL_LOCK"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the 'Shift' key.
+ */
+ public static final String SHIFT_NAME = "SHIFT"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the space (U+0020) key.
+ */
+ public static final String SPACE_NAME = "SPACE"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the tab (U+0009) key.
+ */
+ public static final String TAB_NAME = "TAB"; //$NON-NLS-1$
+
+ /**
+ * The formal name of the vertical tab (U+000B) key.
+ */
+ public static final String VT_NAME = "VT"; //$NON-NLS-1$
+
+ /**
+ * Looks up a single natural key by its formal name, and returns the integer
+ * representation for this natural key
+ *
+ * @param name
+ * The formal name of the natural key to look-up; must not be
+ * <code>null</code>.
+ * @return The integer representation of this key. If the natural key cannot
+ * be found, then this method returns <code>0</code>.
+ */
+ public int formalKeyLookup(String name);
+
+ /**
+ * Looks up a single natural key by its formal name, and returns the integer
+ * representation for this natural key
+ *
+ * @param name
+ * The formal name of the natural key to look-up; must not be
+ * <code>null</code>.
+ * @return The integer representation of this key. If the natural key cannot
+ * be found, then this method returns <code>0</code>.
+ */
+ public Integer formalKeyLookupInteger(String name);
+
+ /**
+ * Looks up a single modifier key by its formal name, and returns the integer
+ * representation for this modifier key
+ *
+ * @param name
+ * The formal name of the modifier key to look-up; must not be
+ * <code>null</code>.
+ * @return The integer representation of this key. If the modifier key
+ * cannot be found, then this method returns <code>0</code>.
+ */
+ public int formalModifierLookup(String name);
+
+ /**
+ * Looks up a key value, and returns the formal string representation for
+ * that key
+ *
+ * @param key
+ * The key to look-up.
+ * @return The formal string representation of this key. If this key cannot
+ * be found, then it is simply the character corresponding to that
+ * integer value.
+ */
+ public String formalNameLookup(int key);
+
+ /**
+ * Returns the integer representation of the ALT key.
+ *
+ * @return The ALT key
+ */
+ public int getAlt();
+
+ /**
+ * Returns the integer representation of the COMMAND key.
+ *
+ * @return The COMMAND key
+ */
+ public int getCommand();
+
+ /**
+ * Returns the integer representation of the CTRL key.
+ *
+ * @return The CTRL key
+ */
+ public int getCtrl();
+
+ /**
+ * Returns the integer representation of the SHIFT key.
+ *
+ * @return The SHIFT key
+ */
+ public int getShift();
+
+// /**
+// * Returns whether the given key is a modifier key.
+// *
+// * @param key
+// * The integer value of the key to check.
+// * @return <code>true</code> if the key is one of the modifier keys;
+// * <code>false</code> otherwise.
+// */
+// public boolean isModifierKey(int key);
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeySequence.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeySequence.java
new file mode 100755
index 000000000..dea50c050
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeySequence.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public interface KeySequence extends TriggerSequence, Comparable<KeySequence> {
+
+ KeyStroke[] getKeyStrokes();
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyStroke.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyStroke.java
new file mode 100755
index 000000000..8dca7f45f
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/KeyStroke.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public interface KeyStroke extends Trigger {
+
+ boolean hasAltModifier();
+
+ boolean hasCtrlModifier();
+
+ boolean hasShiftModifier();
+
+ boolean hasCommandModifier();
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/ParseException.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/ParseException.java
new file mode 100755
index 000000000..8e11b94b7
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/ParseException.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public class ParseException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public ParseException(String string) {
+ super(string);
+ }
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Trigger.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Trigger.java
new file mode 100755
index 000000000..43f480d53
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/Trigger.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+public interface Trigger extends Comparable<Trigger> {
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/TriggerSequence.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/TriggerSequence.java
new file mode 100755
index 000000000..1c3714b2d
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/TriggerSequence.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings;
+
+
+public interface TriggerSequence {
+
+ Trigger[] getTriggers();
+
+ TriggerSequence[] getPrefixes();
+
+ String format();
+
+ boolean isEmpty();
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/service/BindingFactory.java b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/service/BindingFactory.java
new file mode 100755
index 000000000..3b276bb2e
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ui.keybindings/src/org/eclipse/fx/ui/keybindings/service/BindingFactory.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2012 BestSolution.at and others.
+ * 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:
+ * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.fx.ui.keybindings.service;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.fx.ui.keybindings.Binding;
+import org.eclipse.fx.ui.keybindings.KeyLookup;
+import org.eclipse.fx.ui.keybindings.KeySequence;
+import org.eclipse.fx.ui.keybindings.KeyStroke;
+import org.eclipse.fx.ui.keybindings.ParseException;
+import org.eclipse.fx.ui.keybindings.TriggerSequence;
+
+
+public interface BindingFactory {
+
+ KeySequence getKeySequenceInstance(KeyLookup keylookup, String sequence) throws ParseException;
+
+ KeySequence getKeySequenceInstance();
+
+ KeySequence getKeySequenceInstance(KeySequence keySequence, KeyStroke stroke);
+
+ Binding createKeyBinding(TriggerSequence sequence, ParameterizedCommand command, String schemeId, String contextId);
+
+ KeyStroke getKeyStrokeInstance(KeyLookup lookup, int modifierKeys, int naturalKey);
+}
diff --git a/releng/org.eclipse.fx.releng/pom.xml b/releng/org.eclipse.fx.releng/pom.xml
index d19500d0d..a4a3c8bcf 100755
--- a/releng/org.eclipse.fx.releng/pom.xml
+++ b/releng/org.eclipse.fx.releng/pom.xml
@@ -43,6 +43,9 @@
<module>../../bundles/runtime/org.eclipse.fx.emf.edit.ui</module>
<module>../../bundles/runtime/org.eclipse.fx.emf.databinding</module>
+ <!-- e4 -->
+ <module>../../bundles/runtime/org.eclipse.fx.ui.keybindings</module>
+
<!-- Format Conversion -->
<module>../../bundles/runtime/org.eclipse.fx.formats.svg</module>
</modules>

Back to the top