|Default editor based on the project nature [message #512227]
||Thu, 04 February 2010 12:47
| Vincent Zurczak
Registered: July 2009
I have defined a new editor for a certain XML file.
The problem is that this kind of file may have "very" different content
and semantics while they always have the same name.
Therefore, I would like to restrict the use of my editor to a specific
context. If the editor input refers to an IFile, and that this file is
in a project with a certain nature, then use this editor as the default
editor. Otheriwse, use another editor (e.g. the XML editor).
If I had to use content types, I would have to parse the XML file at 2
or 3 levels under the root element. And that would not even guarantee
that this file should have been edited with my editor. The file is
completely associated with its project in the edition process.
I first thought IMatchingEditorInput was the thing to use. But I was
wrong. And I did not find a solution.
Does anybody know how I could do that?
Powered by FUDForum
. Page generated in 0.01771 seconds