Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Content types with 'multiple' extensions
Content types with 'multiple' extensions [message #329764] Thu, 03 July 2008 10:47 Go to next message
Eugene Marcotte is currently offline Eugene MarcotteFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

I originally posted this in the webtools group, but they suggested I try
here.

I'm using Ganymede, on Fedora Core 9, 64 bit.

I was just trying to edit a file using the XML editor, the file does not
end .xml or any of the other xml content types that are listed by default.
The dialog that came up told me to add the content type for this file, so
I did. I added "*.jnlp.in" under xml and I also added *.jnlp while I was
there.

I went back to the file, and tried again. It still wouldn't open, same
exact message comes up. If I rename the file to end with just .jnlp, it
works fine and opens up in the XML editor. If I add Test.jnlp.in (the full
name of the file) to the content types, tried again, and it opened right
up. I just cannot have a 'complex' file extension it seems.

So, I guess my question is: is there a way to get this to work?
Alternatively, is there any way to simply turn off content type checking?
I mean, does the XML editor really care what the extension of my file is
so long as it can be parsed as XML? I don't mind having to go to a file
and say "Open with XML editor" each time, if it will actually work.

Thanks a bunch,
Eugene
Re: Content types with 'multiple' extensions [message #329766 is a reply to message #329764] Thu, 03 July 2008 11:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Eugene,

My guess would be that the extension matcher just looks for the last "."
in the file name and for abc.jnlp.in would find ".in" which would match
only against "*.in".


Eugene Marcotte wrote:
> Hi,
>
> I originally posted this in the webtools group, but they suggested I
> try here.
>
> I'm using Ganymede, on Fedora Core 9, 64 bit.
> I was just trying to edit a file using the XML editor, the file does
> not end .xml or any of the other xml content types that are listed by
> default. The dialog that came up told me to add the content type for
> this file, so I did. I added "*.jnlp.in" under xml and I also added
> *.jnlp while I was there.
>
> I went back to the file, and tried again. It still wouldn't open, same
> exact message comes up. If I rename the file to end with just .jnlp,
> it works fine and opens up in the XML editor. If I add Test.jnlp.in
> (the full name of the file) to the content types, tried again, and it
> opened right up. I just cannot have a 'complex' file extension it seems.
>
> So, I guess my question is: is there a way to get this to work?
> Alternatively, is there any way to simply turn off content type
> checking? I mean, does the XML editor really care what the extension
> of my file is so long as it can be parsed as XML? I don't mind having
> to go to a file and say "Open with XML editor" each time, if it will
> actually work.
> Thanks a bunch,
> Eugene
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Content types with 'multiple' extensions [message #329768 is a reply to message #329766] Thu, 03 July 2008 12:23 Go to previous messageGo to next message
Eugene Marcotte is currently offline Eugene MarcotteFriend
Messages: 5
Registered: July 2009
Junior Member
That sounds pretty logical. Do you think this qualifies as a bug or is
that the desired approach?

Is there no way around it other than putting the full filename or the .in
extension, which i was hoping to avoid since there are several other .in
files that are not XML :)

Thanks for your quick reply!

Eugene

Ed Merks wrote:

> Eugene,

> My guess would be that the extension matcher just looks for the last "."
> in the file name and for abc.jnlp.in would find ".in" which would match
> only against "*.in".


> Eugene Marcotte wrote:
>> Hi,
>>
>> I originally posted this in the webtools group, but they suggested I
>> try here.
>>
>> I'm using Ganymede, on Fedora Core 9, 64 bit.
>> I was just trying to edit a file using the XML editor, the file does
>> not end .xml or any of the other xml content types that are listed by
>> default. The dialog that came up told me to add the content type for
>> this file, so I did. I added "*.jnlp.in" under xml and I also added
>> *.jnlp while I was there.
>>
>> I went back to the file, and tried again. It still wouldn't open, same
>> exact message comes up. If I rename the file to end with just .jnlp,
>> it works fine and opens up in the XML editor. If I add Test.jnlp.in
>> (the full name of the file) to the content types, tried again, and it
>> opened right up. I just cannot have a 'complex' file extension it seems.
>>
>> So, I guess my question is: is there a way to get this to work?
>> Alternatively, is there any way to simply turn off content type
>> checking? I mean, does the XML editor really care what the extension
>> of my file is so long as it can be parsed as XML? I don't mind having
>> to go to a file and say "Open with XML editor" each time, if it will
>> actually work.
>> Thanks a bunch,
>> Eugene
>>
Re: Content types with 'multiple' extensions [message #329773 is a reply to message #329768] Thu, 03 July 2008 13:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Eugene,

I think it's more working as designed. I could have a file like a.b.c.d
so where exactly does the the file name end and the extension begin? I
think the typical/standard definition is that only the last segment
starting with "." is the extension.


Eugene Marcotte wrote:
> That sounds pretty logical. Do you think this qualifies as a bug or is
> that the desired approach?
> Is there no way around it other than putting the full filename or the
> .in extension, which i was hoping to avoid since there are several
> other .in files that are not XML :)
> Thanks for your quick reply!
>
> Eugene
>
> Ed Merks wrote:
>
>> Eugene,
>
>> My guess would be that the extension matcher just looks for the last
>> "." in the file name and for abc.jnlp.in would find ".in" which would
>> match only against "*.in".
>
>
>> Eugene Marcotte wrote:
>>> Hi,
>>>
>>> I originally posted this in the webtools group, but they suggested I
>>> try here.
>>>
>>> I'm using Ganymede, on Fedora Core 9, 64 bit.
>>> I was just trying to edit a file using the XML editor, the file does
>>> not end .xml or any of the other xml content types that are listed
>>> by default. The dialog that came up told me to add the content type
>>> for this file, so I did. I added "*.jnlp.in" under xml and I also
>>> added *.jnlp while I was there.
>>>
>>> I went back to the file, and tried again. It still wouldn't open,
>>> same exact message comes up. If I rename the file to end with just
>>> .jnlp, it works fine and opens up in the XML editor. If I add
>>> Test.jnlp.in (the full name of the file) to the content types, tried
>>> again, and it opened right up. I just cannot have a 'complex' file
>>> extension it seems.
>>>
>>> So, I guess my question is: is there a way to get this to work?
>>> Alternatively, is there any way to simply turn off content type
>>> checking? I mean, does the XML editor really care what the extension
>>> of my file is so long as it can be parsed as XML? I don't mind
>>> having to go to a file and say "Open with XML editor" each time, if
>>> it will actually work.
>>> Thanks a bunch,
>>> Eugene
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Content types with 'multiple' extensions [message #329789 is a reply to message #329773] Thu, 03 July 2008 21:53 Go to previous messageGo to next message
Eugene Marcotte is currently offline Eugene MarcotteFriend
Messages: 5
Registered: July 2009
Junior Member
Makes sense.

Out of curiosity, since it is limited to extensions or whole filenames,
then what is the point of supporting a "wildcard"? Could you just have a
checkbox for each content type to say "extension" vs "full name."

I don't want to sound too cynical but letting me type wildcards makes me
want to actually have it match the wild cards :)

Oh well, I'll just add *.in and live with it for now :)

See ya and thanks for listening!
Eugene

Ed Merks wrote:

> Eugene,

> I think it's more working as designed. I could have a file like a.b.c.d
> so where exactly does the the file name end and the extension begin? I
> think the typical/standard definition is that only the last segment
> starting with "." is the extension.


> Eugene Marcotte wrote:
>> That sounds pretty logical. Do you think this qualifies as a bug or is
>> that the desired approach?
>> Is there no way around it other than putting the full filename or the
>> .in extension, which i was hoping to avoid since there are several
>> other .in files that are not XML :)
>> Thanks for your quick reply!
>>
>> Eugene
>>
>> Ed Merks wrote:
>>
>>> Eugene,
>>
>>> My guess would be that the extension matcher just looks for the last
>>> "." in the file name and for abc.jnlp.in would find ".in" which would
>>> match only against "*.in".
>>
>>
>>> Eugene Marcotte wrote:
>>>> Hi,
>>>>
>>>> I originally posted this in the webtools group, but they suggested I
>>>> try here.
>>>>
>>>> I'm using Ganymede, on Fedora Core 9, 64 bit.
>>>> I was just trying to edit a file using the XML editor, the file does
>>>> not end .xml or any of the other xml content types that are listed
>>>> by default. The dialog that came up told me to add the content type
>>>> for this file, so I did. I added "*.jnlp.in" under xml and I also
>>>> added *.jnlp while I was there.
>>>>
>>>> I went back to the file, and tried again. It still wouldn't open,
>>>> same exact message comes up. If I rename the file to end with just
>>>> .jnlp, it works fine and opens up in the XML editor. If I add
>>>> Test.jnlp.in (the full name of the file) to the content types, tried
>>>> again, and it opened right up. I just cannot have a 'complex' file
>>>> extension it seems.
>>>>
>>>> So, I guess my question is: is there a way to get this to work?
>>>> Alternatively, is there any way to simply turn off content type
>>>> checking? I mean, does the XML editor really care what the extension
>>>> of my file is so long as it can be parsed as XML? I don't mind
>>>> having to go to a file and say "Open with XML editor" each time, if
>>>> it will actually work.
>>>> Thanks a bunch,
>>>> Eugene
>>>>
>>
Re: Content types with 'multiple' extensions [message #329794 is a reply to message #329789] Fri, 04 July 2008 11:55 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Eugene,

Comments below.

Eugene Marcotte wrote:
> Makes sense.
> Out of curiosity, since it is limited to extensions or whole
> filenames, then what is the point of supporting a "wildcard"? Could
> you just have a checkbox for each content type to say "extension" vs
> "full name."
Yes, I always found having to specify the * a little odd but I guess the
"*." is a reasonable syntactic way to distinguish it from a full file name.
> I don't want to sound too cynical but letting me type wildcards makes
> me want to actually have it match the wild cards :)
Seems a reasonable expectation, but keep in mind that this would in
practice require pattern matching against each pattern-based content
type rather than a table look up based on extension only or file name only.
>
> Oh well, I'll just add *.in and live with it for now :)
The path of least resistance. :-P
>
> See ya and thanks for listening!
> Eugene
>
> Ed Merks wrote:
>
>> Eugene,
>
>> I think it's more working as designed. I could have a file like
>> a.b.c.d so where exactly does the the file name end and the extension
>> begin? I think the typical/standard definition is that only the last
>> segment starting with "." is the extension.
>
>
>> Eugene Marcotte wrote:
>>> That sounds pretty logical. Do you think this qualifies as a bug or
>>> is that the desired approach?
>>> Is there no way around it other than putting the full filename or
>>> the .in extension, which i was hoping to avoid since there are
>>> several other .in files that are not XML :)
>>> Thanks for your quick reply!
>>>
>>> Eugene
>>>
>>> Ed Merks wrote:
>>>
>>>> Eugene,
>>>
>>>> My guess would be that the extension matcher just looks for the
>>>> last "." in the file name and for abc.jnlp.in would find ".in"
>>>> which would match only against "*.in".
>>>
>>>
>>>> Eugene Marcotte wrote:
>>>>> Hi,
>>>>>
>>>>> I originally posted this in the webtools group, but they suggested
>>>>> I try here.
>>>>>
>>>>> I'm using Ganymede, on Fedora Core 9, 64 bit.
>>>>> I was just trying to edit a file using the XML editor, the file
>>>>> does not end .xml or any of the other xml content types that are
>>>>> listed by default. The dialog that came up told me to add the
>>>>> content type for this file, so I did. I added "*.jnlp.in" under
>>>>> xml and I also added *.jnlp while I was there.
>>>>>
>>>>> I went back to the file, and tried again. It still wouldn't open,
>>>>> same exact message comes up. If I rename the file to end with just
>>>>> .jnlp, it works fine and opens up in the XML editor. If I add
>>>>> Test.jnlp.in (the full name of the file) to the content types,
>>>>> tried again, and it opened right up. I just cannot have a
>>>>> 'complex' file extension it seems.
>>>>>
>>>>> So, I guess my question is: is there a way to get this to work?
>>>>> Alternatively, is there any way to simply turn off content type
>>>>> checking? I mean, does the XML editor really care what the
>>>>> extension of my file is so long as it can be parsed as XML? I
>>>>> don't mind having to go to a file and say "Open with XML editor"
>>>>> each time, if it will actually work.
>>>>> Thanks a bunch,
>>>>> Eugene
>>>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: Can't add extras p2 update site
Next Topic:Why doesn't the Eclipse console stream?
Goto Forum:
  


Current Time: Mon Dec 30 17:34:21 GMT 2024

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

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

Back to the top