Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Opening correct editor based on content type
Opening correct editor based on content type [message #327865] Tue, 06 May 2008 19:24 Go to next message
Eclipse UserFriend
Originally posted by: david_whiteman.us.ibm.com

I have a content type defined in Eclipse using a content describer.
This type uses the .xml extension, but is a specialization of XML. I
have noticed that when the file that matches my content type is a
workspace file, my editor is correctly invoked. But when I open the
file from the file system, using File > Open File..., the default XML
editor is opened. What do I need to do so that in that scenario, it
will still identify the file as being of my content type.

Apparently the Ant editor has the same problem. Try this to see what I
mean:
1. create an Ant build file in the workspace.
2. double click to open the file and the Ant file editor is correctly
invoked
3. export the file to the file system
4. open the external file using File > Open File...
5. observe that the XML editor is used to display the file, not the Ant
editor

Thanks in advance for any help...

David
Re: Opening correct editor based on content type [message #327868 is a reply to message #327865] Tue, 06 May 2008 20:28 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------050107020402060504020201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

David,

There was a bugzilla open requesting this.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=98002

I've voted for it and maybe I'll have some time to help implement it.


Whiteman wrote:
> I have a content type defined in Eclipse using a content describer.
> This type uses the .xml extension, but is a specialization of XML. I
> have noticed that when the file that matches my content type is a
> workspace file, my editor is correctly invoked. But when I open the
> file from the file system, using File > Open File..., the default XML
> editor is opened. What do I need to do so that in that scenario, it
> will still identify the file as being of my content type.
>
> Apparently the Ant editor has the same problem. Try this to see what
> I mean:
> 1. create an Ant build file in the workspace.
> 2. double click to open the file and the Ant file editor is correctly
> invoked
> 3. export the file to the file system
> 4. open the external file using File > Open File...
> 5. observe that the XML editor is used to display the file, not the
> Ant editor
>
> Thanks in advance for any help...
>
> David


--------------050107020402060504020201
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
There was a bugzilla open requesting this.<br>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=98002">https://bugs.eclipse.org/bugs/show_bug.cgi?id=98002</a>
<br>
</blockquote>
I've voted for it and maybe I'll have some time to help implement it.&nbsp; <br>
<br>
<br>
Whiteman wrote:
<blockquote cite="mid:fvqb9q$4r1$1@build.eclipse.org" type="cite">I
have a content type defined in Eclipse using a content describer. This
type uses the .xml extension, but is a specialization of XML.&nbsp; I have
noticed that when the file that matches my content type is a workspace
file, my editor is correctly invoked.&nbsp; But when I open the file from
the file system, using File &gt; Open File..., the default XML editor
is opened.&nbsp; What do I need to do so that in that scenario, it will
still identify the file as being of my content type.
<br>
<br>
Apparently the Ant editor has the same problem.&nbsp; Try this to see what I
mean:
<br>
1. create an Ant build file in the workspace.
<br>
2. double click to open the file and the Ant file editor is correctly
invoked
<br>
3. export the file to the file system
<br>
4. open the external file using File &gt; Open File...
<br>
5. observe that the XML editor is used to display the file, not the Ant
editor
<br>
<br>
Thanks in advance for any help...
<br>
<br>
David
<br>
</blockquote>
<br>
</body>
</html>

--------------050107020402060504020201--
Previous Topic:compile error for eclipse-sourceBuild-srcIncluded-3.4M7.zip
Next Topic:Enhance Presentation's control over the workbench look beyond recent 3.4M6 changes
Goto Forum:
  


Current Time: Sun Jul 21 15:25:44 GMT 2024

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

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

Back to the top