How to

Post here questions and problems related to editing and publishing DITA content.
Vince
Posts: 66
Joined: Wed Dec 03, 2014 11:25 am

How to

Post by Vince »

Hi,

I'm looking for a method to force my DITA extension additional framework as the highest priority (over DITA framework)

In my "dita_extension.framework", I already have highest priority.

Is it possible to prevent the user from changing the priority in "Options -> Preferences -> Document Type Association" page ?

Code: Select all

<field name="extensionPatch">
  <documentTypeDescriptorPatch>
    ...
    <poPatch>
      <field name="fieldPath">
	  <String>priority</String>
      </field>
      <field name="value">
         <Integer>5</Integer>
      </field>
      ...
    </poPatch>
    ...
    <field name="extendedPersistentObjectKey">
      <String>DITA</String>
    </field>
  </documentTypeDescriptorPatch>
</field>
Thx

Vince
Vince
Posts: 66
Joined: Wed Dec 03, 2014 11:25 am

Re: How to

Post by Vince »

To clarify my needs

My framework is installed as an add-on.
User can't change priority of this kind of framework.
But, as he can change the DITA framework priority to the highest, my custom framework is no longer a priority.

I see that because my custom handler that extends "DITAExternalObjectInsertionHandler" is not use any more.

Thx
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to

Post by Radu »

Hi,
I understand, we do not have a specific setting to prohibit this. Then end user is in full control in the end, they can also disable your add-on for example as it's their Oxygen installation and they can override the settings your add-on contributed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Vince
Posts: 66
Joined: Wed Dec 03, 2014 11:25 am

Re: How to

Post by Vince »

Ok, thank you for that answer.

And can we access frameworks priority from a plugin ? for example to display a warn to user if priority is not good

Regards,
Vincent
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to

Post by Radu »

Hi Vince,

If for example you add an editor changed listener:

Code: Select all

 pluginWorkspaceAccess.addEditorChangeListener(new WSEditorChangeListener() {
        @Override
        public void editorOpened(URL editorLocation) {
          WSEditor editor = pluginWorkspaceAccess.getEditorAccess(editorLocation, StandalonePluginWorkspace.MAIN_EDITING_AREA);
you have API to access the document type info "editor.getDocumentTypeInformation()".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply