-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins
oXbytei makes use of a system of Java plugins for different functions of the editor. E.g. a function may be the generation of suggestions for content completion, e.g. suggestions for attribute values; or the presentation of a UI dialog. For each type of function, there is a Java interface, that defines the function. Then, there may be an arbitrary number of implementations that provide this type of function, i.e. implement the Java interface. These implementations are what we call plugins. We a plugin is called, it is (can be) configured with arguments specific for the current editing context.
-
ILabelledEntriesProvider (
de.wwu.scdh.teilsp.services.extensions.ILabelledEntriesProvider
) :: This type of plugin generates suggestions for content completion or a list of what we call labelled entries. Usally these labelled entries are presented in a UI dialog which lets the user choose. Their name indicates, that the labels presented to the user may differ from the actual value (key). There are plugins for accessing XML data via XQuery, XSLT etc. or CSV data. A plugin for accessing RDF endpoints is planned. -
ISelectionDialog (
de.wwu.scdh.teilsp.ui.ISelectionDialog
) :: This type of plugin brings a dialog up on the UI. There are plugins for combo boxes, editable combo boxes, multi-select dialogs based on check boxes or lists. The default dialog is an editable combo box.
Functions planned:
-
IAnnotationFinder
, find annotations referencing the current context. -
IXMLOperation
, re-implementation of some author mode operations based on a mode-agnostic manner.
The above mentioned functions are configurable functions. I.e. when
the user requests a function in a specific editing context, plugins
configured for this function in this editing context are looked up in
the configuration. The plugins found are then initialized for this
specific editing context. E.g. when we are on rdg/@wit
and request
labelled entries, a XSLT plugin may be found that generates labelled
entries from a witness catalogue file. When we also request a user
dialog for this context, again the configuration is looked up for a
plugin that provides a dialog for this kind of context, e.g. check
boxes for multiple selection of witnesses.
-
de.wwu.scdh.teilsp.extensions.LabelledEntriesXQuery
:: Provides labelled entries from an XQuery script. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesXSLT
:: Provides labelled entries from an XSLT stylesheet. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesXSLTWithContext
:: Provides labelled entries from an XSLT stylesheet which has access to the current document. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesCSV
:: Provides labelled entries from CSV data, including CSV, TDF, Excel, etc. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesFromConfig
:: Provides labelled entries directly from the configuration file. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesFromXMLByPrefixDef
:: Used for dealing with sources linked in private URI schemes defined in<prefixDef>
. -
de.wwu.scdh.teilsp.extensions.LabelledEntriesFromXML
: Used for grabbing suggestions from the contents of the currently edited document. -
de.wwu.scdh.oxbytei.extensions.SchemaAttributeValuesProvider
:: Provides suggestions from allowed values defined in the XML schema.
-
de.wwu.scdh.teilsp.ui.CheckBoxSelectDialog
:: multiple selections based on check boxes -
de.wwu.scdh.teilsp.ui.ComboBoxSelectDialog
:: single selection based on a combo box -
de.wwu.scdh.teilsp.ui.EditableComboBoxSelectDialog
:: single selection based on an editable combo box. This is the default dialog and will be presented if no other dialog is configured. -
de.wwu.scdh.teilsp.ui.ComboBoxSelectDialog
:: single selection based on a combo box -
de.wwu.scdh.teilsp.ui.ListSelectDialog
:: single or multiple selections based on a list dialog -
de.wwu.scdh.teilsp.ui.FilteringListSelectDialog
:: single or multiple selections based on a list dialog. This offers filtering of the suggestions through a filter text field. State: Experimental. Does not scroll to the selected item yet.
The plugin code is completely decoupled from oXygen. It is part of a project, that is intended to be used in any editor via LSP in the future. So, it's worth developing plugins, because their're not bound to oXygen.
The plugins are loaded using Java's service provider interface (SPI). This makes the plugin system super extensible.