Rodin Keyboard User Guide: Difference between revisions
imported>Pascal |
imported>Pascal |
||
Line 1: | Line 1: | ||
{{ | |||
{| cellspacing="0" cellpadding="0" style="clear: right; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: auto;" {{#if:|class="toclimit-{{{limit}}}"}} | |||
| __TOC__ | |||
|} | |||
== Introduction == | == Introduction == | ||
Line 248: | Line 251: | ||
== Samples == | == Samples == | ||
=== Expression === | === Expression === | ||
{{ | <span style="background-color:yellow;">'''TODO'''</span>{{#if: |<nowiki>: </nowiki>''{{{1}}}''}} | ||
=== Jumping === | === Jumping === | ||
{{ | <span style="background-color:yellow;">'''TODO'''</span>{{#if: |<nowiki>: </nowiki>''{{{1}}}''}} | ||
[[Category:User documentation]] | [[Category:User documentation]] | ||
[[Category:Work in progress]] | [[Category:Work in progress]] |
Revision as of 14:58, 19 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.
Samples
Expression
TODO
Jumping
TODO