具体操作:Eclipse—>Window—>Preferences—>General—>Editor—>File Associations…
操作如下图所示:
1、 在“File types:”选中要设置打开方式的文件的后缀(eg. *.js文件)
2、 在“Associatededitors”选中文件的打开方式(eg. Spket JavaScript Editor)
3、 点击“Default”按钮,最后点击“OK”按钮即可
参考网址:http://zhidao.baidu.com/question/383513586.html