Rodin Keyboard User Guide: Difference between revisions
imported>Pascal |
imported>Laurent m Renamed "RODIN Keyboard" to "Rodin Keyboard". |
||
Line 7: | Line 7: | ||
== Getting Started == | == Getting Started == | ||
=== Overview === | === Overview === | ||
The Rodin Keyboard plug-in creates a view (namely " | The Rodin Keyboard plug-in creates a view (namely "Rodin Keyboard") under Event-B category. | ||
You can open " | You can open "Rodin Keyboard" view now: | ||
# Go to Window/Show View/Other. | # Go to Window/Show View/Other. | ||
# Choose the " | # 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). | The view contains a text area which takes an ASCII input and translate it into the mathematical language (defined by extensions). | ||
Line 194: | Line 194: | ||
== Concepts == | == 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. | 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. | ||
Line 205: | Line 205: | ||
== Tasks == | == Tasks == | ||
=== Entering a Mathematical Formula === | === Entering a Mathematical Formula === | ||
A formula in the mathematical language of Event-B can be typed in the text area of the | 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 [[#Special_Combos | here]]. The formula can be copied as normal (Unicode) text. | ||
=== Changing the Font === | === Changing the Font === | ||
Line 231: | Line 231: | ||
=== Preferences === | === Preferences === | ||
The Preferences page is used to change the font of the text area in the | 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. | A sample of this preferences page is shown below. |
Revision as of 12:31, 21 July 2010
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 this extension point is shown below.
<extension point="org.eventb.eventBKeyboard.translators"> <translator class="org.eventb.eventBKeyboard.views.EventBKeyboardTextTranslator"> </translator> <translator class="org.eventb.eventBKeyboard.views.EventBKeyboardMathTranslator"> </translator> </extension>
The class attribute must be a fully qualified name of the class that implements org.eventb.eventBKeyboard.views.IEventBKeyboardTranslator. It involves to implement the abstract translate(Text widget) method. An example can be taken from org.eventb.eventBKeyboard.views.EventBKeyboardTextTranslator or org.eventb.eventBKeyboard.views.EventBKeyboardMathTranslator.
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