Problems with author actions in framework extension script
Posted: Fri Aug 04, 2023 11:39 am
Hi,
we are extending the ediarum.BASE.edit framework with an respective extension script file (see end of this post).
But I'm experiencing an extremely shaky integration of added author actions. It seems to me almost unpredictable what oxygen does, when adding custom author actions within custom toolbars or for content completion. Sometimes the addition of one author action leads to all custom toolbars not showing up. Sometimes toolbars do show up, but certain defined actions are missing. Same with the actions added for content completion.
Just one arbitrary example from the extension script:
When giving
then this action is showing nicely in the code completion assistant as well as in the elements view.
BUT, when adding just this "choice" action:
then both disappear from element view.
Same goes for toolbars. The actual script (see end of post) has these custom toolbars: But if you just add, for example, "<addAction id="deletion"/>" to
then the new action is shown, while two of the other custom toolbars are gone completely:
I checked the xml files of the self-defined author actions multiple times and can't find any error within those. Here is, for example, the mentioned action "deletion":
As said earlier, it seems unpredictable, what oxygen is doing, when adding custom actions, toolbars or code completion stuff within the extension script. I tried every so other way to solve this, but without success.
I wonder if these are known issues - or if my extension script has flaws that I just cannot identify.
Help is very much appreciated!
Kind regards
And here the complete extension script:
we are extending the ediarum.BASE.edit framework with an respective extension script file (see end of this post).
But I'm experiencing an extremely shaky integration of added author actions. It seems to me almost unpredictable what oxygen does, when adding custom author actions within custom toolbars or for content completion. Sometimes the addition of one author action leads to all custom toolbars not showing up. Sometimes toolbars do show up, but certain defined actions are missing. Same with the actions added for content completion.
Just one arbitrary example from the extension script:
When giving
Code: Select all
<contentCompletion>
<authorActions>
<addAction id="insert.xinclude" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
</authorActions>
</contentCompletion>
BUT, when adding just this "choice" action:
Code: Select all
<contentCompletion>
<authorActions>
<addAction id="insert.xinclude" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
<addAction id="choice" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
</authorActions>
</contentCompletion>
Same goes for toolbars. The actual script (see end of post) has these custom toolbars: But if you just add, for example, "<addAction id="deletion"/>" to
Code: Select all
<toolbar name="hi-del">
<addAction id="toggle-hi[#i]"/>
<addAction id="toggle-[hi#spaced]"/>
<addAction id="toggle-superscript"/>
<addAction id="toggle-subscript"/>
<addAction id="toggle-[hi#halfTone]"/>
<addAction id="deletion"/>
</toolbar>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<a:authorAction id="deletion"
xmlns:a="http://www.oxygenxml.com/ns/author/external-action"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/author/external-action http://www.oxygenxml.com/ns/author/external-action/authorAction.xsd">
<a:name>*Tilgung</a:name>
<a:description>Tilgung kennzeichnen</a:description>
<a:operations>
<a:operation id="ToggleSurroundWithElementOperation">
<a:arguments>
<a:argument name="element"><del xmlns="http://www.tei-c.org/ns/1.0"/></a:argument>
</a:arguments>
</a:operation>
</a:operations>
<a:accelerator></a:accelerator>
<a:enabledInReadOnlyContext>false</a:enabledInReadOnlyContext>
</a:authorAction>
I wonder if these are known issues - or if my extension script has flaws that I just cannot identify.
Help is very much appreciated!
Kind regards
And here the complete extension script:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--
The file must be saved inside a framework directory, the same place where a *.framework file should sit.
To generate a *.framework file out of the script, you need to use the "Compile Framework Extension script" action
from the contextual menu.
-->
<script xmlns="http://www.oxygenxml.com/ns/framework/extend"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/framework/extend http://www.oxygenxml.com/ns/framework/extend/frameworkExtensionScript.xsd"
base="ediarum.BASE.edit">
<name>WOA.edit</name>
<description>Die Basis für oXygen-Anpassungen zur Bearbeitung der Oßmannstedter Edition von Wielands Werken.</description>
<associationRules inherit="none">
<addRule attributeLocalName="doctype" attributeNamespace="*" attributeValue="woa*"/>
<addRule attributeLocalName="doctype" attributeNamespace="http://www.telota.de"
attributeValue="pagina*"/>
</associationRules>
<defaultSchema schemaType="rng" href="${framework}/schemata/woa.rng"/>
<xmlCatalogs inherit="all">
<addEntry path="${framework}/catalog.xml"/>
</xmlCatalogs>
<classpath inherit="all">
<addEntry path="${framework}/resources" position="before"/>
</classpath>
<documentTemplates inherit="all">
<addEntry path="${frameworkDir}/templates"/>
</documentTemplates>
<transformationScenarios>
<addScenarios href="${frameworkDir}/transform/prepare-print-export.scenarios"/>
</transformationScenarios>
<priority>High</priority>
<author>
<!--
Author Actions are loaded from these directories:
{framework_directory}/externalAuthorActions
{framework_directory}/{framework_file_name}_externalAuthorActions
https://www.oxygenxml.com/doc/versions/22.1/ug-editor/topics/dg-create-custom-actions.html#dg-create-custom-actions__section_2
-->
<authorActions>
<removeAction id="add"/>
<removeAction id="del"/>
<removeAction id="del_gap"/>
<removeAction id="gap"/>
<removeAction id="sic-corr[deleted]"/>
<removeAction id="subst"/>
<removeAction id="unclear"/>
<removeAction id="Kommentar hinzufügen"/>
</authorActions>
<css selectMultipleAlternateCSS="true" mergeDocumentCSS="true">
<removeCss path="${framework(ediarum.BASE.edit)}/css/text-critical.css"/>
<removeCss path="${framework(ediarum.BASE.edit)}/css/text-comments.css"/>
<removeCss path="${framework(ediarum.BASE.edit)}/css/standard.css"/>
<removeCss path="${framework(ediarum.BASE.edit)}/css/links.css"/>
<!-- <addCss path="${framework(ediarum.BASE.edit)}/css/standard.css" title="TEI-Standardansicht" alternate="true"/> -->
<addCss path="${framework}/styles/Wieland_neueFarben.css" title="WOA" alternate="true"/>
<!-- <addCss path="${framework}/styles/woa.css"/> -->
</css>
<toolbars>
<toolbar name="Metadaten">
<removeGroup name="Metadaten"/>
<removeGroup name="Briefmetadaten"/>
</toolbar>
<toolbar name="Text">
<removeGroup name="Zeilenumbruch"/>
<removeGroup name="Folio- und Seitenwechsel"/>
<removeGroup name="Korrekturen"/>
<removeGroup name="Listen"/>
<removeGroup name="Namen kennzeichnen"/>
<removeGroup name="Tabelle"/>
<removeGroup name="Textstellen indizieren"/>
<removeGroup name="Sprache und Schriftart"/>
<removeGroup name="Datum"/>
<removeGroup name="Verweise"/>
<removeAction id="ex"/>
<removeAction id="figure"/>
<removeAction id="hi[superscript]"/>
<removeAction id="hi[underline]"/>
<removeAction id="note"/>
<!--
<removeAction id="add"/>
<removeAction id="del"/>
<removeAction id="del_gap"/>
<removeAction id="sic-corr[deleted]"/>
<removeAction id="subst"/>
<removeAction id="unclear"/>
-->
<removeAction id="supplied"/>
<removeAction id="paragraph"/>
<removeAction id="seg"/>
<!-- modify existing groups -->
<!--
<group name="Verweise" largeIconPath="${framework(ediarum.BASE.edit)}/icons/verweis.gif" smallIconPath="${framework(ediarum.BASE.edit)}/icons/verweis16.gif">
<addAction id="ref[index]" position="before"/>
</group>
<group name="Zeilenumbruch" largeIconPath="${framework(ediarum.BASE.edit)}/icons/lb.gif" smallIconPath="${framework(ediarum.BASE.edit)}/icons/lb16.gif">
<removeAction id="lb[break]"/>
</group>
-->
</toolbar>
<toolbar name="Sonderzeichen">
<removeGroup name="Symbole"/>
<!-- <addAction id="metrisches_Kreuz_klein" position="before"/>
<addAction id="metrisches_Kreuz_klein_u" position="before"/>
<separator/>
-->
<group name="Sonderzeichen">
<addAction id="SonderzeichenAE_lig"/>
<addAction id="SonderzeichenAEligKlein"/>
<addAction id="SonderzeichenOELigGroß"/>
<addAction id="SonderzeichenLigOKlein"/>
<addAction id="SonderzeichenC"/>
<addAction id="SonderzeichenFranzCKlein"/>
<addAction id="SonderzeichenEMitZweiPunkten"/>
<addAction id="Sonderzeichenë"/>
<addAction id="SonderzeichenIPunkte"/>
<addAction id="SonderzeichenIKleinPunkte"/>
<addAction id="SonderzeichenKleinYPunkte"/>
<addAction id="LATIN_SMALL_LETTER_D_WITH_STROKE"/>
<!-- <addAction id="SonderzeichenS"/> -->
<!-- <separator/> -->
<addAction id="SonderzeichenKleinOStrich"/>
<addAction id="SonderzeichenTildeN"/>
<addAction id="SonderzeichenSDachGroß"/>
<addAction id="SonderzeichenSDachKlein"/>
<!-- <separator/> -->
<!-- <addAction id="SonderzeichenErgänzungAutor"/>
<addAction id="SonderzeichenÄnderungPfeil"/>
<addAction id="SonderzeichenApostrophUnten"/>
<addAction id="SonderzeichenApostroph"/>
<addAction id="Sonderzeichen Anführungszeichen Unten"/>
<addAction id="Sonderzeichen Anführung Oben"/>
<addAction id="SonderzeichenDreiPunkt"/>
<addAction id="SonderzeichenDivis"/>
<addAction id="SonderzeichenHalbgeviertstrich"/>
-->
<addAction id="SonderzeichenDivision"/>
<addAction id="SonderzeichenPlusMinus"/>
<!-- <addAction id="SonderzeichenEinViertel"/>
<addAction id="SonderzeichenEinHalb"/>
<addAction id="SonderzeichenDreiViertel"/>
-->
<addAction id="SonderzeichenArrowUp"/>
<addAction id="SonderzeichenArrowDown"/>
<addAction id="SonderzeichenArrowDiagonalUp"/>
<!-- <addAction id="toggle-fremdtext"/>
<addAction id="toggle-Trennzeichen"/>
<addAction id="SonderzeichenVerserweiterung"/>
<addAction id="SonderzeichenVerszusammenführung"/>
<addAction id="SonderzeichenNeueSeite"/>
<addAction id="SonderzeichenStreichung"/>
<separator/>
<addAction id="SonderzeichenSiglenKlammer"/>
<addAction id="SonderzeichenZeilenX"/>
<addAction id="SonderzeichenArrowZickDown"/>
<addAction id="SonderzeichenArrowCircleUp"/>
<addAction id="SonderzeichenArrowRightStop"/>
<addAction id="SonderzeichenArrowLeftStop"/>
<addAction id="SonderzeichenArrowUpStop"/>
<addAction id="SonderzeichenArrowDownStop"/>
<addAction id="Sonderzeichen Extrapaginal"/>
-->
<addAction id="Verschleifung"/>
<!-- <addAction id="SonderzeichenVerserweiterung"/>
<addAction id="SonderzeichenVerszusammenführung"/>
-->
</group>
</toolbar>
<toolbar name="include">
<addAction id="insert.xinclude"/>
</toolbar>
<toolbar name="hi-del">
<addAction id="toggle-hi[#i]"/>
<addAction id="toggle-[hi#spaced]"/>
<addAction id="toggle-superscript"/>
<addAction id="toggle-subscript"/>
<addAction id="toggle-[hi#halfTone]"/>
<addAction id="deletion"/>
</toolbar>
<toolbar name="emendrdg">
<addAction id="choice"/>
<addAction id="surrApp"/>
</toolbar>
<toolbar name="specia">
<addAction id="seg-commented"/>
<addAction id="persName"/>
</toolbar>
</toolbars>
<contextualMenu>
<submenu name="Other actions">
<addAction id="insert.note"/>
</submenu>
</contextualMenu>
<menu name="ediarum">
<removeSubmenu name="Herausgeberbearbeitung"/>
<removeSubmenu name="Briefmetadaten"/>
<submenu name="Textstruktur">
<submenu name="Zeilenumbruch">
<removeAction id="lb[break]"/>
</submenu>
</submenu>
<submenu name="Autorbearbeitungen">
<removeAction id="hi[underline]"/>
<removeAction id="hi[superscript]"/>
<addAction id="toggle-superscript"/>
<addAction id="toggle-subscript"/>
</submenu>
<submenu name="Herausgeberbearbeitung">
<removeAction id="sic-corr[deleted]"/>
</submenu>
<submenu name="Transkription gedruckter Texte">
<removeAction id="hi[#i]"/>
<addAction id="toggle-hi[#i]"/>
</submenu>
</menu>
<contentCompletion>
<authorActions>
<addAction id="insert.xinclude" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
</authorActions>
</contentCompletion>
</author>
<!--
<addAction id="surrApp" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
<addAction id="choice" inCCWindow="true" displayOnlyWhenElementAllowed="true" inElementsView="true"/>
-->
</script>