Page 1 of 1

Remove processing-instruction from content completion

Posted: Fri Sep 23, 2022 8:12 pm
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

Re: Remove processing-instruction from content completion

Posted: Mon Sep 26, 2022 5:17 pm
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

Re: Remove processing-instruction from content completion

Posted: Wed Sep 28, 2022 6:54 pm
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

Re: Remove processing-instruction from content completion

Posted: Thu Sep 29, 2022 5:35 pm
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

Re: Remove processing-instruction from content completion

Posted: Fri Sep 30, 2022 10:43 am
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

Re: Remove processing-instruction from content completion

Posted: Thu Oct 13, 2022 4:51 pm
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