Page 1 of 1

Removing toolbar items from Oxygen 23.1

Posted: Tue Jan 11, 2022 11:26 am
by mu258770
Hi team,

We would like to remove some toolbar items from Eclipse based Oxygen Author 23.1 .

The screenshot is attached for those we wish to remove (xml refactoring, delete currnet tags...). It seems it not possible to remove them using frameworks. Is it possible to be removed using some other ways ? Previously we had also removed some other items using plugin.properties and plugin.xml file changes. Is it possible to hide/remove these toolbar items using similar method?

Regards,
Shabeer
oxygen.JPG
oxygen.JPG (10.19 KiB) Viewed 834 times

Re: Removing toolbar items from Oxygen 23.1

Posted: Wed Jan 12, 2022 1:47 pm
by Radu
Hi Shabeer,

In the Oxygen plugin's "plugin.xml" there is an extension point:

Code: Select all

  <extension-point id="actionBarContributorCustomizer" name="Action Bar Contributor Customizer"
    schema="exsd-schema/actionBarContributorCustomizer.exsd"/>
So a third party Eclipse plugin implemented by you in Java and which depends on our plugin could implement this API "com.oxygenxml.editor.editors.ActionBarContributorCustomizer" and get called on this method "com.oxygenxml.editor.editors.ActionBarContributorCustomizer.customizeActionsContributedToDocumentToolbar(List<IAction>)" so that it could remove certain actions from the document toolbar list.

Regards,
Radu

Re: Removing toolbar items from Oxygen 23.1

Posted: Fri Mar 17, 2023 9:04 am
by mu258770
Hi Radu,

We have tried to remove the items using the extension point, but could not. When we printed the IDs/tooltip text/description of the Oxygen toolbar items, the above ones are not listed. I guess it is not possible to remove them using this method.
(BTW, We were able to remove many other items from toolbar using this method, but not these items.)
Is there any other methods you can suggest?

Regardss,
Shabeer

Re: Removing toolbar items from Oxygen 23.1

Posted: Fri Mar 17, 2023 2:25 pm
by Radu
Hi Shabeer,
I should have paid a closer attention to the toolbar you wanted to remove.
That particular XML refactoring toolbar is defined and added in our eclipse plugin's "plugin.xml", if you open our plugin's "plugin.xml", it's defined in this place:

Code: Select all

<toolbar id="xmlrefactory" label="%extension.name.0">
so I think this is the toolbar you want to remove but besides modifying our plugin.xml I'm not sure if you can use the regular Eclipse APis to access it and hide it. Maybe it's possible but I do not know how.

Regards,
Radu