open with menu [message #460046] |
Tue, 12 December 2006 08:21 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04846 seconds