Rodin Keyboard User Guide
Introduction
This short help page provides necessary information on the Rodin Keyboard plug-in and also on how to extend the plug-in.
Getting Started
Overview
The Rodin Keyboard plug-in creates a view (namely "Rodin Keyboard") under Event-B category.
You can open "Rodin Keyboard" view now:
- Go to Window/Show View/Other.
- Choose the "Rodin Keyboard" view from the Event-B category.
The view contains a text area which takes an ASCII input and translate it into the mathematical language (defined by extensions).
Special Combos
Below are the special combos (set of ASCII characters) and their translations into the Event-B mathematical language.
Concepts
Rodin Keyboard View
The view contains a text area where ASCII input can be typed in. The text will be translated into the mathematical language (which is extensible) when there is a modification of the text. The translation is done for the whole text spanned over multiple lines.
Below is an example of the view which is attached to the bottom area of the workbench.
Tasks
Entering a Mathematical Formula
A formula in the mathematical language of Event-B can be typed in the text area of the Rodin Keyboard view. The view will translate the formula from ASCII into the mathematical language as specified here. The formula can be copied as normal (Unicode) text.
Changing the Font
In order to display the Unicode characters for the mathematical language, there is a special font associated with the text area. This font can be changed in the Preferences page associated with the Colors and Fonts. It can be opened from the category "General/Appearance/Colors And Fonts". Any font can be chosen, but mathematical language formulas can be displayed correctly only if the chosen font contains the Unicode characters for the mathematical language. From the Preferences page, you can choose the font, the style and the size for the text area.
More information about the Preferences page can be found here.
Extending the Keyboard
There is an extension point to extend the keyboard namely org.rodinp.keyboard.symbols. An example of using this extension point is shown below.
<extension point="org.rodinp.keyboard.symbols"> <symbol combo="not" id="neg" name="%negName" translation="¬" /> <symbolProvider class="my.package.name.MyClassProvidingSymbols" /> </extension>
The first extension contributes a symbol with all the details for translating an ASCII combination into a symbol. The second extension contributes a class. This class will be instantiated by the Rodin Keyboard plug-in to fetch additional symbol definitions. This allows for contributing new symbols dynamically.
Reference
Release Notes
See the Keyboard Release History.
Preferences
The Preferences page is used to change the font of the text area in the Rodin Keyboard view. You can access it from the "General/Appearance/Colors and Fonts" page.
A sample of this preferences page is shown below.
The button "Change Font" is used to choose a new font. A pop-up dialog will be open and you can choose from the set of system fonts. The button "Reset" is used to set the font to the default Brave Sans Mono font.
There are four other buttons at the bottom of the page:
- Restore Default: Restore the default fonts. It does not affect the Keyboard view.
- Apply: Apply the current chosen font for the Keyboard view.
- OK: Store the preference values to the preference store and close the page. It also applies the current chosen font for the Keyboard view.
- Cancel: Close the page immediately without saving the preference values. Obviously, this does not affect the Keyboard view.
Samples
Expression
TODO
Jumping
TODO