Skip to main content


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 12:47
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
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 Apr 26 11:35:50 GMT 2024

Powered by FUDForum. Page generated in 0.03169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top