Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-ui-dev] How to install plugin to "Open With" context menu?

Hi Kevin,
 
Thanks for your response. I know how to register plugin for certain file extensions (EHEP plugin is already associated with exe, dll, com, bin, hex and class extensions), but I would like to avoid that, because the EHEP plugin could be used for *any* extension, not only those that is already associated with. That's why I'm trying to find out how to add this plugin directly to "Open With" submenu. Then it would be ready for any extension without registration in Preferences -> Workbench -> File Associations.
 
Randallco
-----Original Message-----
From: platform-ui-dev-admin@xxxxxxxxxxx [mailto:platform-ui-dev-admin@xxxxxxxxxxx]On Behalf Of Kevin Haaland
Sent: May 18, 2004 8:37 PM
To: platform-ui-dev@xxxxxxxxxxx
Subject: Re: [platform-ui-dev] How to install plugin to "Open With" context menu?


Randallco,

 Here is a sample that I created using the PDE template for an XML editor, I added one more extension type "txt" to make the extensions the editor knows about a little more interesting.

 <extension
         point="org.eclipse.ui.editors">
      <editor
            name="Sample XML Editor"
            extensions="xml,txt"    <=== Here is were the file extensions that this editor knows about are declared
            icon="icons/sample.gif"
            contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
            class="Test.editors.XMLEditor"
            id="Test.editors.XMLEditor">
      </editor>
   </extension>





"Randallco" <randallco@xxxxxxxxxxxxxxxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

05/18/2004 08:21 PM

Please respond to
platform-ui-dev

To
<platform-ui-dev@xxxxxxxxxxx>
cc
Subject
[platform-ui-dev] How to install plugin to "Open With" context menu?





Hi there,

I have a question - I'm working on Hex Editor plugin for Eclipse
(http://ehep.sourceforge.net). People keep asking me to install this plugin
into "Open With" context menu in the Navigator and Package Explorer. Is it
possible?

I've already managed to install this plugin into the root level of context
menu using this <objectContribution> in my plugin.xml file:

                <extension point="org.eclipse.ui.popupMenus">
                                 <objectContribution
                                                  id="net.sourceforge.ehep.editors.HexEditor"
                                                  objectClass="org.eclipse.core.resources.IFile">
                                                  <action
                                                                   id="net.sourceforge.ehep.editors.HexEditor.open"
                                                                   label="Hex Editor"
                                                                   icon="icons/ehep.gif"
                                                                   menubarPath="ehep"
                                                                   style="push"

helpContextId="net.sourceforge.ehep.editors.HexEditor.open_editor_action_con
text"
                                                                   class="net.sourceforge.ehep.actions.PopupMenuActionDelegate"
                                                                   enablesFor="1">
                                                  </action>
                                 </objectContribution>
                </extension>

It works fine, but I would really like to have it under "Open With" submenu.
Please advise.

Thank you.

Randallco
http://ehep.sourceforge.net

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top