Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Opening of editors on file extensions
Opening of editors on file extensions [message #333717] Fri, 26 December 2008 06:08 Go to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member
Hello All,

I have been trying this problem for a long time now, not able to find any
solution for it.
Like if i have two files with same extension, i want file 1 to open with
editor1 and file2 to open with editor2 after reading the contents from the
file.Currently eclipse does it by mentioning the file extension in the
plugin.xml.But for opeining of multiple editors on a single extension is
not possible.

Any suggestions or hints for this problem will be hugely appreciated.

Thanks and Regards,
Saurav


Re: Opening of editors on file extensions [message #333738 is a reply to message #333717] Tue, 30 December 2008 14:09 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

saurav wrote:
> in the plugin.xml.But for opeining of multiple editors on a single
> extension is not possible.
>
> Any suggestions or hints for this problem will be hugely appreciated.

That's what content types does. for a given extension (say XML) have a
look at the first X bytes and decide what kind of file it is (like an
ant buildfile vs a normal XML file).

There is an extension for contributing content types, and I believe you
can also specify them in your editor definition.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Activity id and Pattern
Next Topic:Loading Icons From Another Plugin
Goto Forum:
  


Current Time: Fri Nov 08 22:08:19 GMT 2024

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

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

Back to the top