|Link a custom EditorInput to a resource type [message #539085]
||Wed, 09 June 2010 15:25
| Guillaume P.
Registered: June 2010
Location: Toulouse, France
I am currently trying to open a customized editor when the user double-click on a *.myExtension file in the package explorer (or another explorer type).
The problem is that my editor needs, during initialization, some informations which are not in the file. The solution I fund is to create a new implementation of IEditorInput interface (MyEditorInput) containing these extra informations. The system works when I create myself the MyEditorInput instance before using it with the IWorkbenchPage.openEditor(...) function.
But the problem is when the user accesses the editor via the package explorer (I've used here the org.eclipse.ui.editors extension point). Here a simple IFileEditorInput is created...
I tried to override the EditorPart.init(IEditorSite site, IEditorInput input) in order to transform the IFileEditorInput to a MyEditorInput before calling the super.init(...) with the new editor input, but it is too late.
I have also tried to use the org.eclipse.ui.navigator.LinkHelper extension point:
with the org.eclipse.ui.navigator.viewer extension point:
... but it does nothing (the MyLinkHelper is not used)... Moreover, this extension point seems to be specific to only one navigator view, while the file can be opened from several type of navigators views (Package explorer, Project explorer, ...)
Could someone help me, please ? :-/
[Updated on: Thu, 10 June 2010 08:04]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.12447 seconds