An extension point for oXygen XML editor that will get activated when you try to edit an attribute inside the Attributes View. It shows a dialog that with the possible values together with their annotation and a search filed that can be used to locate a particular value.
- Copy build/generic/attribute-editor.jar into the framework directory
- Edit your framework inside Oxygen preferences.
- Select the Classpath tab and add an entry to the attribute-editor.jar. Please make sure you are using the ${framework} varaible so that the framework remains portable.
- Select the Extensions tab, go on the "Author custom attribute value editor", click Choose and select: com.oxygenxml.samples.attribute.editor.SearchableAttributeEditor
The editor looks at a configuration file to see on which attributes it should be used. This file has a predefined name: config_attribute_editor.txt which has a content like this:
elementLocalName1, attributeLocalName1 elementLocalName2, attributeLocalName2 elementLocalName3, attributeLocalName3
How to put this file in your framework:
- Create a file named config_attribute_editor.txt in your framework directory, let us assume at the location: ${framework}/resources
- Edit the framework inside Oxygen preferences.
- Select the Classpath tab and add an entry with the directory that contains the configuration file, in our case: ${framework}/resources
For TEI, if you are running Oxygen version 16 or later:
-
Unzip build/tei/attribute-editor-framework.zip inside {oxygenInstallDir}/frameworks . Please make sure you don't create any additional directories in the process. After unzipping, the file structure should look like this: {oxygenInstallDir} ----frameworks ------attribute-editor-framework --------tei_p5_-_attribute_value_editor.framework
-
edit attribute-editor-framework/config_attribute_editor.txt . This is the configuration file in which you specify the element and the attribute that should be edited using this specialized dialog. It accepts pairs like this:
elementLocalName1, attributeLocalName1 elementLocalName2, attributeLocalName2 elementLocalName3, attributeLocalName3