简体   繁体   English

Eclipse 2020 Javascript 编辑器默认不工作

[英]Eclipse 2020 Javascript Editor Default Not Working

Everytime I open a js file in Eclipse 2020 it defaults to the system text editor.每次我在 Eclipse 2020 中打开一个 js 文件时,它默认为系统文本编辑器。 I have set Window->Preferences->General->Editors->File Associations *.js to JavaScript Editor and set this as the default with not chnage in the behaviour.我已将 Window->Preferences->General->Editors->File Associations *.js 设置为 JavaScript Editor 并将其设置为默认值,并且在行为中没有更改。

If I open a js file by right click Open with->Other->Internal Editors, choose JavaScript Editor and tick Use for all '*.js' files, the particular file will open with the javascript editor this time but only this time.如果我通过右键单击打开方式->其他->内部编辑器打开一个 js 文件,选择 JavaScript 编辑器并勾选用于所有 '*.js' 文件,此特定文件将使用 javascript 编辑器打开,但仅此一次。 No other js files open afterwards and even if I double click the same file it still lopens with the default text editor.之后没有其他 js 文件打开,即使我双击同一个文件,它仍然会使用默认文本编辑器打开。

The only way I can open js files with the javascript editor is if I always right click Open with->Other->Internal Editors, choose JavaScript Editor, each and every time I want to open a js file.我可以使用 javascript 编辑器打开 js 文件的唯一方法是,如果我总是右键单击打开方式->其他->内部编辑器,选择 JavaScript 编辑器,每次我想打开一个 js 文件。

In addition, the open decalration does not work for js files.另外,开放的声明对 js 文件不起作用。 It works for java files though.它适用于 java 文件。

you can fix it by clicking in Window->Preferences->General->Editors->File Associations then you can add *.js in the file list if it does not show up then you click on *.js and on the bottom of the screen you get a list with the used editors of the file type there should be generic text editor if it is not there you can add it on the right then you right click generic text editor en set to default i hope this fixes youre problem您可以通过单击 Window->Preferences->General->Editors->File Associations 来修复它,然后您可以在文件列表中添加 *.js 如果它没有显示然后您单击 *.js 并在底部屏幕上你会得到一个文件类型的使用编辑器列表应该有通用文本编辑器如果它不在那里你可以在右边添加它然后你右键单击通用文本编辑器设置为默认值我希望这可以解决你的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM