Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » open with menu
open with menu [message #460046] Tue, 12 December 2006 08:21
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

Hi!
Is that possible to re-use open with menu for not file base items in a
tree, for example.
I mean in fill method for OpenWithMenu item, it says the following:
public void fill(Menu menu, int index) {
IFile file = getFileResource();
if (file == null) {
return;
}

IEditorDescriptor defaultEditor = registry
.findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
// may be null
IEditorDescriptor preferredEditor = IDE.getDefaultEditor(file);
// may be null

Object[] editors = registry.getEditors(file.getName(),
IDE.getContentType(file));

So, the content of open sub-menu is based on files. Can that a bit
changed or do I have to write my own implementation of OpenWithMenu?
Thanks very much in advance.
Previous Topic:general preference page
Next Topic:Content not displayed with Common Navigator
Goto Forum:
  


Current Time: Sat Mar 22 09:26:02 EDT 2025

Powered by FUDForum. Page generated in 0.04846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top