Everytime I open a js file in Eclipse 2020 it defaults to the system text editor. 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.
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. No other js files open afterwards and even if I double click the same file it still lopens with the default text editor.
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.
In addition, the open decalration does not work for js files. It works for java files though.