oXygen CSS customization.

Posts: 5
Joined: Fri Mar 22, 2019 9:06 am

oXygen CSS customization.

Post by Anvesh » Mon Mar 25, 2019 9:02 am

We are using oXygen author 19.1 for eclipse plugin.

We have seen oXygen CSS capabilities in which the form has an option to add a single attribute and values using check box (oxy_checkbox). We are trying to modify it in such a way that it should be able to add multiple attributes and values with a single check box.

We got hint that we need to create a custom Form control to achieve this goal. We already have oXygen maven setup ready and we have already used "actionBarContributorCustomizer" extension point to customize XML menu in oXygen.

Could you please let me know which classes to be extended for this custom form control, and some hints on how to achieve this?

Thank you in advance!

Posts: 6395
Joined: Fri Jul 09, 2004 5:18 pm

Re: oXygen CSS customization.

Post by Radu » Mon Mar 25, 2019 4:20 pm

Hi Anvesh,

Our custom form control-related documentation is here:

https://www.oxygenxml.com/doc/versions/ ... trols.html
I'm afraid we do not have a sample form control implementation for the Eclipse platform.
If you want you can email us (support@oxygenxml.com) I could provide you with the Java source code we use for the Eclipse implementation of the check box editor, implementation which you could try to edit for your needs.
Another 2 possibilities:

- Let the check box commit a single attribute value. Then add an AuthorDocumentFilter:

https://www.oxygenxml.com/InstData/Edit ... ilter.html which intercepts the AuthorDocumentFilter.setAttribute(AuthorDocumentFilterBypass, String, AttrValue, AuthorElement) callback and instead of setting one attribute it can set two attributes on the same element.

- Instead of a checkbox use an "oxy_button" form control which looks like a checkbox (it can have an icon looking like a checked checkbox). When the button is cliked, a custom Author action can be invoked:

https://www.oxygenxml.com/doc/versions/ ... ditor.html

Radu Coravu
<oXygen/> XML Editor

Post Reply