Hi,
I've a sources jar file on disk that is not part of the JavaModel, i.e., not referenced in any JavaProject nor target platform etc.
However, I'd like to open zip entry (= the sources of a ITypeRoot) inside that jar with a minimum of Java syntax highlighting. I'd also like to intercept events like 'Open Declaration' but that's not a hard requirement yet.
Are there any pointers how to achieve that?
My first guess using a NullEditorInput (see below) requires me to return an ITypeRoot in NullEditorInput.getAdapter() which I don't know how to produce it easily.
The ILocationProvider interface requires a path which (I assume) only works with local files. I'd prefer to not unzip the entry to a local file before.
Thanks in Advance
String source = getRemoteSourceFile(searchResult);
IWorkbenchPage page = getViewSite().getPage();
IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(".java");
page.openEditor(new NullEditorInput(), desc.getId());
[Updated on: Sat, 21 February 2015 04:23] by Moderator