diff --git a/org.eventb.texteditor.ui/META-INF/MANIFEST.MF b/org.eventb.texteditor.ui/META-INF/MANIFEST.MF index 372d9f5998a11208542139a0dd739495d5937c8d..483d96aea9db13d622f7f11d3c6a946aaad9db42 100644 --- a/org.eventb.texteditor.ui/META-INF/MANIFEST.MF +++ b/org.eventb.texteditor.ui/META-INF/MANIFEST.MF @@ -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.eclipse.ui.editors;bundle-version="[3.8.0,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.core.resources;bundle-version="3.8.1", 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:= org.rodinp.core;bundle-version="1.7.0", org.eventb.core;bundle-version="3.1.0", 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-Vendor: Heinrich-Heine University Dusseldorf Export-Package: org.eventb.texteditor.ui; diff --git a/org.eventb.texteditor.ui/src/org/eventb/texteditor/ui/build/ast/FormulaTranslator.java b/org.eventb.texteditor.ui/src/org/eventb/texteditor/ui/build/ast/FormulaTranslator.java index d2c2687974f2d61d3c7f620b49ebe7c6d7c0b66f..7a10bca20e893208b20a0e291299d4ec3d86167f 100644 --- a/org.eventb.texteditor.ui/src/org/eventb/texteditor/ui/build/ast/FormulaTranslator.java +++ b/org.eventb.texteditor.ui/src/org/eventb/texteditor/ui/build/ast/FormulaTranslator.java @@ -23,7 +23,7 @@ import org.eventb.emf.core.machine.Machine; import org.eventb.texteditor.ui.editor.EventBTextEditor; import org.eventb.texttools.TextPositionUtil; import org.eventb.texttools.model.texttools.TextRange; -import org.rodinp.keyboard.ui.RodinKeyboardUIPlugin; +import org.rodinp.keyboard.core.RodinKeyboardCore; public class FormulaTranslator { private IDocument document; @@ -60,7 +60,7 @@ public class FormulaTranslator { final String input = predicate.getPredicate(); if (input != null) { - final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); + final String translatedInput = RodinKeyboardCore.translate(input); if (!input.equals(translatedInput)) { // replace in emf node @@ -77,7 +77,7 @@ public class FormulaTranslator { final String input = expression.getExpression(); if (input != null) { - final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); + final String translatedInput = RodinKeyboardCore.translate(input); if (!input.equals(translatedInput)) { // replace in emf node @@ -94,7 +94,7 @@ public class FormulaTranslator { final String input = action.getAction(); if (input != null) { - final String translatedInput = RodinKeyboardUIPlugin.getDefault().translate(input); + final String translatedInput = RodinKeyboardCore.translate(input); if (!input.equals(translatedInput)) { // replace in emf node @@ -115,12 +115,12 @@ public class FormulaTranslator { * Output should always be <= input. */ final int lengthDiff = input.length() - translatedInput.length(); - Assert - .isTrue(lengthDiff >= 0, - "Expecting length of translated formula to be less or equal to original length"); + Assert.isTrue(lengthDiff >= 0, + "Expecting length of translated formula to be less or equal to original length"); final String filledString = fillOutput(translatedInput, lengthDiff); Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { try { int cursorOffset = -1;