Remove processing-instruction from content completion

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 141
Joined: Fri Jan 20, 2017 1:11 pm

Remove processing-instruction from content completion

Post by Isabelle »

Hello,

In version 24.1.0.0, is it possible to remove processing-instruction from the content completion ?

I tried this in our framework extension script files and it does not work :

Code: Select all

<contentCompletion xmlns="http://www.oxygenxml.com/ns/framework/extend">
    <schemaProposals>
      <removeProposal renderName="processing-instruction"/>
    </schemaProposals>
</contentCompletion>

Code: Select all

<contentCompletion xmlns="http://www.oxygenxml.com/ns/framework/extend">
  <authorActions>
    <removeAction id="processing-instruction" inCCWindow="true"/>
  </authorActions>
</contentCompletion>
Thanks,
Regards,
Isabelle
alex_jitianu
Posts: 1007
Joined: Wed Nov 16, 2005 11:11 am

Re: Remove processing-instruction from content completion

Post by alex_jitianu »

Hi,
It can be filtered like this. What happens is that you must specify from where you want to remove the proposals. If no "from" attribute is specified then no filtering is performed. In the next version we changed the default behavior and we will remove the proposal from all places when no specific "from " attribute is declared.

Code: Select all

    <contentCompletion>
      <schemaProposals>
        <removeProposal renderName="processing-instruction" fromCCWindow="true"/>
      </schemaProposals>
    </contentCompletion>
Best regards,
Alex
Isabelle
Posts: 141
Joined: Fri Jan 20, 2017 1:11 pm

Re: Remove processing-instruction from content completion

Post by Isabelle »

Hello,

I tried this

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<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="S1000D - DM Procedure">
  <name>S1000D - DM Procedure - CUSTOM</name>
  <description/>
  <priority>Highest</priority>

  <author>
    <contentCompletion>
      <schemaProposals>
        <removeProposal renderName="processing-instruction" fromCCWindow="true"/>
      </schemaProposals>
    </contentCompletion>
  </author>
</script>
And I still have processing-instruction in the content completion pop-up.
processing-instruction does not come with our schema but from Oxygen.
Is it possible to filter Oxygen native proposal like processing-instruction, comment and cdata ?

Regards,
Isabelle
alex_jitianu
Posts: 1007
Joined: Wed Nov 16, 2005 11:11 am

Re: Remove processing-instruction from content completion

Post by alex_jitianu »

Hi Isabelle,

I'm not sure why it's not working. I've tried it myself and it worked. I'll investigate a bit more.

You can hide hide them from options. Also, from the API you can use ro.sync.exml.workspace.api.options.GlobalOptionsStorage.setGlobalObjectProperty(String, Object) to impose these options. The value must be a java.lang.Boolean and the keys are:

Code: Select all

author.show.processing.instructions
author.show.comments
author.show.doctypes
Best regards,
Alex
alex_jitianu
Posts: 1007
Joined: Wed Nov 16, 2005 11:11 am

Re: Remove processing-instruction from content completion

Post by alex_jitianu »

Hi Isabelle,

I've managed to reproduce the issue with the framework script. I will investigate it and fix it for the next release.

Best regards,
Alex
alex_jitianu
Posts: 1007
Joined: Wed Nov 16, 2005 11:11 am

Re: Remove processing-instruction from content completion

Post by alex_jitianu »

Hello,

In Oxygen 25, which was just released, we've fixed this issue.You'll be able cu customize schema proposals when creating a new framework without a base. I hope it helps in the future!

Best regards,
Alex
Post Reply