Difference between revisions of "Element action (extension point)"
From BioUML platform
Tagir Valeev (Talk | contribs) (Created page with "{{Extension point|elementAction|ru.biosoft.access|since=0.9.4|registry=ru.biosoft.access.repository.PluginActions}} ;Applicable for :BioUML workbench === Description === ...") |
Latest revision as of 15:47, 17 June 2013
- Identifier
- ru.biosoft.access.elementAction
- Plugin
- ru.biosoft.access
- Since
- 0.9.4
- Registry
PluginActions
- Applicable for
- BioUML workbench
[edit] Description
The elementAction extension is the modern alternative to repositoryActionsProvider extension point. It allows to register context menu action for repository elements in BioUML workbench. Registered actions are displayed on repository pane toolbar and available by right-click in repository pane.
[edit] Configuration markup
<!ELEMENT action (property*)> <!ATTLIST action name CDATA #REQUIRED class CDATA #REQUIRED priority CDATA #REQUIRED >
- name
- internal action name.
- class
- fully-qualified name of action class (must subclass
AbstractElementAction
). - priority
- action priority (number). Actions with bigger priority numbers are displayed higher in the repository pane context menu. If action priority exceeds 40, it can be performed as default action when user double-clicks on the element (provided that no other actions with higher priorities are available for given element). If the maximal priority value for given element less or equals to 40, then no default action will be performed by double-click.
<!ELEMENT property> <!ATTLIST property name CDATA #REQUIRED value CDATA #REQUIRED >
- name
- name of action property.
- value
- value of action property.
The following properties are defined:
- Name
- user-visible name of the action.
- ShortDescription
- user-visible short description of the action.
- LongDescription
- user-visible long description of the action.
- MnemonicKey
- hotkey name to perform the action (see the constants defined in
KeyEvent
class). - SmallIcon
- path to 16x16 icon file
- ActionCommandKey
- internal action identifier
Other properties are ignored.
[edit] Example
<extension point="ru.biosoft.access.elementAction"> <action name="Repeat analysis" class="ru.biosoft.analysis.gui.RepeatAnalysisAction" priority="20"> <property name="Name" value="Repeat analysis"/> <property name="ShortDescription" value="Open analysis which was used to create this element"/> <property name="LongDescription" value="Open analysis which was used to create this element"/> <property name="MnemonicKey" value="VK_R"/> <property name="SmallIcon" value="repeat.gif"/> <property name="ActionCommandKey" value="cmd-repeat-analysis"/> </action> </extension>
This extension defines an action implemented in RepeatAnalysisAction
class with priority 20.