Bug 156593 - Treat *.es (ECMAScript) files the same as *.js (JavaScript) files
Summary: Treat *.es (ECMAScript) files the same as *.js (JavaScript) files
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Webtools.WST.Javascript (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Amy Wu CLA
QA Contact: David Williams CLA
URL: http://www.rfc-editor.org/rfc/rfc4329...
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2006-09-07 16:02 EDT by Dave Hodder CLA
Modified: 2010-03-03 11:35 EST (History)
3 users (show)

See Also:


Attachments
Test ECMAScript file (100 bytes, text/plain)
2006-09-13 17:20 EDT, Dave Hodder CLA
no flags Details
Adds *.es files to the valid JavaScript editor contentTypes. (672 bytes, patch)
2007-07-26 19:55 EDT, David Carver CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hodder CLA 2006-09-07 16:02:42 EDT
ECMAScript is the programming language defined by Ecma International upon which JavaScript is based.  RFC 4329 defines it as having the ".es" file extension.

Would it be possible for Eclipse WTP to treat ".es" files the same way it treats ".js" files, in terms of colour-coding, etc.?
Comment 1 Amy Wu CLA 2006-09-13 16:34:04 EDT
So basically all that needs to be done is to add the "es" extension to the javascript content type in javascript.core's plugin.xml?

This would basically be the equivalent of a user going to Preferences->General->Content Types->Text/JavaScript and Add..-ing *.es to the list of file associations.

Dave, have you tried this?  Does everything look okay?  Do you have some example *.es files you could attach?
Comment 2 Dave Hodder CLA 2006-09-13 17:20:58 EDT
Created attachment 50093 [details]
Test ECMAScript file
Comment 3 Dave Hodder CLA 2006-09-13 17:23:48 EDT
Yes, it really is that simple!  :o)  Thank you Amy.
Comment 4 David Carver CLA 2007-07-26 16:40:18 EDT
I'll work on this one for bugday.
Comment 5 Chris Aniszczyk CLA 2007-07-26 17:31:47 EDT
cc'ng Nitn
Comment 6 David Carver CLA 2007-07-26 19:55:55 EDT
Created attachment 74750 [details]
Adds *.es files to the valid JavaScript editor contentTypes.

This patch updates the plugin.xml, with the necessary "es" added to the contenttype extension.  Now .js, and .es files are automatically associated with the javascript editor.
Comment 7 Chris Aniszczyk CLA 2007-07-27 11:24:22 EDT
Nitin, this is a pretty straightforward patch :)
Comment 8 Nitin Dahyabhai CLA 2007-07-27 12:37:53 EDT
True, but it is still Amy's to review (and I always forget when whitespace is or is not significant in extension points--it infuriatingly varies case by case).
Comment 9 Amy Wu CLA 2007-07-30 15:23:50 EDT
Patch looks good to me.  I'm going to target wtp 3.0 m1 since this is an enhancement.

Thanks, Dave.

(In reply to comment #8)
> (and I always forget when whitespace is or is not significant in extension 
> points--it infuriatingly varies case by case).

If you mean a whitespace between file extensions, in all our other plugins where we specify extensions for content type, we use no whitespace.  This patch had a whitespace, but it did not seem to matter. It still worked.
Comment 10 Amy Wu CLA 2007-08-23 14:20:42 EDT
Sorry, I mean I'll put it in for 3.0 M2.
Comment 11 Amy Wu CLA 2007-09-12 12:00:10 EDT
Fix released for this week's wtp 3.0 m2 integration build.  Thanks again, Dave.
Comment 12 David Williams CLA 2008-04-24 00:43:41 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.