Opening correct editor based on content type [message #327865] |
Tue, 06 May 2008 15:24  |
Eclipse User |
|
|
|
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 16:28  |
Eclipse User |
|
|
|
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. <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. 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.
<br>
<br>
Apparently the Ant editor has the same problem. 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 > 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--
|
|
|
Powered by
FUDForum. Page generated in 0.07208 seconds