Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Opening of editors on file extensions
Opening of editors on file extensions [message #333717] Fri, 26 December 2008 01:08 Go to next message
Eclipse UserFriend
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 09:09 Go to previous message
Eclipse UserFriend
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: Wed Apr 30 08:31:55 EDT 2025

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

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

Back to the top