|DocumentProvider for external opened files [message #795295]
||Fri, 10 February 2012 04:49
| M Dahlem
Registered: November 2011
Does anyone know a way to connect own documentproviders with external files in Eclipse?
My plugin.xml looks like
If I open a file (IFile/ FileEditorInput) located in the workspace all will work fine.
But if I open a file outside the workspace, the default documentprovider (TextFileDocumentProvider) is opened.
The problem is, that the DocumentProviderRegistry computes only the file extension if the input is an IFile. For IFileStore it looks only at the class name of the input.
Therefore I extended my documentprovider extensionpoint to
Now it will work.
But now the documentprovider is used for every file located in and outside the workspace. (That means all files, not only *.tbpl would use the documentprovider).
So my question is: is it possible to create an own EditorInput (like an IEditorInputProvider) to connect the documentProvider with? Or does anyone know how to do some stuff like this?
Or is it a bug in eclipse, that the file extensions are only used for "IFile" and not for "IFileStore"
Powered by FUDForum
. Page generated in 0.01997 seconds