Please can anyone explain how to add context menu entry in eclipse oxygen?

Oxygen general issues.
asaadat
Posts: 1
Joined: Thu Apr 12, 2018 2:20 pm

Please can anyone explain how to add context menu entry in eclipse oxygen?

Post by asaadat »

I have seen a lot of documentation related to this but still i am not successful in adding a context menu entry in eclipse. Do i have to make a new plugin for this, and after adding org.eclipse.ui.menu extension point, how to handle the locationuris and commands, i am new into this, so please it will be really kind of you to briefly describe the solution considering me a newbie.

Best Regards,
Abu Bakar Saadat
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Please can anyone explain how to add context menu entry in eclipse oxygen?

Post by Radu »

Hi,

So when an XML document is opened using the Oxygen XML Editor Eclipse plugin and you right click inside the XML content you want to add a custom action, right?
In the Oxygen XML Editor eclipse plugin folder there is a "plugin.xml" which describes an extension point like:

Code: Select all

  <!--The usage in the other plugin.xml is something like:
<extension point="com.oxygenxml.editor.actionBarContributorCustomizer">
<implementation class="my.package.CustomActionBarContributorCustomizer"/>;
</extension>

where CustomActionBarContributorCustomizer extends "com.oxygenxml.editor.editors.ActionBarContributorCustomizer"
-->
<extension-point id="actionBarContributorCustomizer" name="Action Bar Contributor Customizer"
schema="exsd-schema/actionBarContributorCustomizer.exsd"/>
so your custom Eclipse plugin can require on our Eclipse plugin and then implement this particular extension point. An implementation of the "com.oxygenxml.editor.editors.ActionBarContributorCustomizer" Java class will receive various callbacks (for adding actions to various contextual menus, toolbars and main menus).

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