Perspective (extension point)
From BioUML platform
- Identifier
- biouml.workbench.perspective
- Plugin
- biouml.workbench
- Since
- 0.9.3
- Registry
PerspectiveRegistry
Description
This extension point allows you to add your own perspective.
Configuration markup
<!ELEMENT perspective (repository,viewparts)> <!ATTLIST perspective name CDATA #REQUIRED priority CDATA #REQUIRED intro CDATA #IMPLIED />
- name
- name of the perspective (how it will be displayed to the user).
- priority
- number which controls the position of the perspective in the perspectives selection box. Perspectives with higher priorities are displayed on top. The highest priority perspective is the default one. Currently the default perspective has the priority 100, thus please use lower numbers if you don't want to override it.
- intro
- if specified, points to the name of alternative start page html file for BioUML web edition. For example, if you specify
intro="intro-my-perspective"
, you should put file namedintro-my-perspective.html
to the webfiles directory. This option is ignored in BioUML workbench.
<!ELEMENT repository (tab)*> <!ELEMENT tab> <!ATTLIST tab title CDATA #REQUIRED path CDATA #REQUIRED databases CDATA #IMPLIED />
- title
- title of the repository pane tab.
- path
- path to the root collection displayed in this tab.
- databases
- if defined and set to
"true"
, instructs the BioUML workbench that current tab is "Databases" tab, which may be treated specially (e.g. search bar is displayed). Ignored in BioUML web edition.
<!ELEMENT viewparts (allow|deny)*> <!ELEMENT allow> <!ATTLIST allow id CDATA #REQUIRED /> <!ELEMENT deny> <!ATTLIST deny id CDATA #REQUIRED />
These options define which viewparts will be allowed in given perspective. Each viewpart has an internal ID. You may allow or deny specific viewparts or sets of viewparts using wildcards in id attribute.
Example
<extension id="Proteome perspective" point="biouml.workbench.perspective"> <perspective name="Proteome" priority="20" intro="intro-proteome"> <repository> <tab title="Proteome" path="Proteome"/> </repository> <viewparts> <deny id="*"/> <allow id="table.*"/> <allow id="common.log"/> <allow id="common.description"/> </viewparts> </perspective> </extension>
This extension defines the perspective called "Proteome" with priority "20" and custom intro page "intro-proteome.html". Repository pane will consist of only one tab with the name "Proteome" displayed root collection named "Proteome". All viewparts are disabled except "common.log", "common.description" and all table-related viewparts.
Notes
- No Java code is necessary for this extension.
- You may consider also defining virtual collections to alter the content of repository pane.