Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Default editor based on the project nature
Default editor based on the project nature [message #512227] Thu, 04 February 2010 07:47
Vincent Zurczak is currently offline Vincent Zurczak
Messages: 140
Registered: July 2009
Senior Member
Hi,

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?

Regards,

Vincent.
Previous Topic:Question on TextEditor
Next Topic:Workspace changes
Goto Forum:
  


Current Time: Fri Aug 29 16:24:12 EDT 2014

Powered by FUDForum. Page generated in 0.01516 seconds