Skip to content
Snippets Groups Projects
Commit 5ba1b5a1 authored by Sebastian Krings's avatar Sebastian Krings
Browse files

use keyboard core instead of keyboard ui

parent e81dfe70
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ Require-Bundle: org.eventb.texttools;bundle-version="[3.1.0,3.3.0)";visibility:= ...@@ -14,7 +14,6 @@ Require-Bundle: org.eventb.texttools;bundle-version="[3.1.0,3.3.0)";visibility:=
org.eventb.core.ast;bundle-version="[3.1.0,4.0.0)", org.eventb.core.ast;bundle-version="[3.1.0,4.0.0)",
org.eclipse.ui.editors;bundle-version="[3.8.0,4.0.0)", org.eclipse.ui.editors;bundle-version="[3.8.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.8.2,4.0.0)", org.eclipse.ui.ide;bundle-version="[3.8.2,4.0.0)",
org.rodinp.keyboard.ui;bundle-version="[2.0.0,3.0.0)",
org.eclipse.ui.workbench.texteditor, org.eclipse.ui.workbench.texteditor,
org.eclipse.core.resources;bundle-version="3.8.1", org.eclipse.core.resources;bundle-version="3.8.1",
org.eventb.emf.core;bundle-version="[4.0.0,5.0.0)", org.eventb.emf.core;bundle-version="[4.0.0,5.0.0)",
...@@ -23,7 +22,8 @@ Require-Bundle: org.eventb.texttools;bundle-version="[3.1.0,3.3.0)";visibility:= ...@@ -23,7 +22,8 @@ Require-Bundle: org.eventb.texttools;bundle-version="[3.1.0,3.3.0)";visibility:=
org.rodinp.core;bundle-version="1.7.0", org.rodinp.core;bundle-version="1.7.0",
org.eventb.core;bundle-version="3.1.0", org.eventb.core;bundle-version="3.1.0",
org.eclipse.emf.edit, org.eclipse.emf.edit,
org.eventb.texteditor.parsers org.eventb.texteditor.parsers,
org.rodinp.keyboard.core;bundle-version="[2.0.0,3.0.0)"
Bundle-ClassPath: . Bundle-ClassPath: .
Bundle-Vendor: Heinrich-Heine University Dusseldorf Bundle-Vendor: Heinrich-Heine University Dusseldorf
Export-Package: org.eventb.texteditor.ui; Export-Package: org.eventb.texteditor.ui;
......
...@@ -23,7 +23,7 @@ import org.eventb.emf.core.machine.Machine; ...@@ -23,7 +23,7 @@ import org.eventb.emf.core.machine.Machine;
import org.eventb.texteditor.ui.editor.EventBTextEditor; import org.eventb.texteditor.ui.editor.EventBTextEditor;
import org.eventb.texttools.TextPositionUtil; import org.eventb.texttools.TextPositionUtil;
import org.eventb.texttools.model.texttools.TextRange; import org.eventb.texttools.model.texttools.TextRange;
import org.rodinp.keyboard.ui.RodinKeyboardUIPlugin; import org.rodinp.keyboard.core.RodinKeyboardCore;
public class FormulaTranslator { public class FormulaTranslator {
private IDocument document; private IDocument document;
...@@ -60,7 +60,7 @@ public class FormulaTranslator { ...@@ -60,7 +60,7 @@ public class FormulaTranslator {
final String input = predicate.getPredicate(); final String input = predicate.getPredicate();
if (input != null) { if (input != null) {
final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); final String translatedInput = RodinKeyboardCore.translate(input);
if (!input.equals(translatedInput)) { if (!input.equals(translatedInput)) {
// replace in emf node // replace in emf node
...@@ -77,7 +77,7 @@ public class FormulaTranslator { ...@@ -77,7 +77,7 @@ public class FormulaTranslator {
final String input = expression.getExpression(); final String input = expression.getExpression();
if (input != null) { if (input != null) {
final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); final String translatedInput = RodinKeyboardCore.translate(input);
if (!input.equals(translatedInput)) { if (!input.equals(translatedInput)) {
// replace in emf node // replace in emf node
...@@ -94,7 +94,7 @@ public class FormulaTranslator { ...@@ -94,7 +94,7 @@ public class FormulaTranslator {
final String input = action.getAction(); final String input = action.getAction();
if (input != null) { if (input != null) {
final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); final String translatedInput = RodinKeyboardCore.translate(input);
if (!input.equals(translatedInput)) { if (!input.equals(translatedInput)) {
// replace in emf node // replace in emf node
...@@ -115,12 +115,12 @@ public class FormulaTranslator { ...@@ -115,12 +115,12 @@ public class FormulaTranslator {
* Output should always be <= input. * Output should always be <= input.
*/ */
final int lengthDiff = input.length() - translatedInput.length(); final int lengthDiff = input.length() - translatedInput.length();
Assert Assert.isTrue(lengthDiff >= 0,
.isTrue(lengthDiff >= 0,
"Expecting length of translated formula to be less or equal to original length"); "Expecting length of translated formula to be less or equal to original length");
final String filledString = fillOutput(translatedInput, lengthDiff); final String filledString = fillOutput(translatedInput, lengthDiff);
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() { public void run() {
try { try {
int cursorOffset = -1; int cursorOffset = -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment