Rodin Keyboard User Guide: Difference between revisions
imported>Pascal |
imported>Pascal mNo edit summary |
||
Line 229: | Line 229: | ||
See the [http://wiki.event-b.org/index.php/Keyboard_Release_History Keyboard Release History]. | See the [http://wiki.event-b.org/index.php/Keyboard_Release_History Keyboard Release History]. | ||
=== Preferences === | === <font id="preferences"> 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. | 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. | ||
Revision as of 10:28, 18 February 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.