Bug 573902 - .js files opened by default in the Text Editor...
... instead of in the Generic Text Editor
Associate the "Generic Text Editor" with the "Text > JavaScript Source
File" ("org.eclipse.wst.jsdt.core.jsSource") content type.
In bug 563395 the standalone JSDT JavaScript editor has been removed,
but the "org.eclipse.wst.jsdt.core.jsSource" ("Text > JavaScript Source
File") content type remained for JavaScript files, inheriting the plain
"Text Editor" as associated editor from its parent content type
"org.eclipse.core.runtime.text".
This causes .js files to be opened with the plain Text Editor instead of
with the Generic Text Editor with JavaScript language support by Eclipse
Wild Web Developer which has its own content type for JavaScript files
("Text > Wild Web Developer supported web dev file > JavaScript") also
associated with the .js file extension.
Since the "org.eclipse.wst.jsdt.core.jsSource" content type seems still
be required for .js files, associate the "Generic Text Editor"
("org.eclipse.ui.genericeditor.GenericEditor") with the "Text >
JavaScript Source File" ("org.eclipse.wst.jsdt.core.jsSource") content
type, so the Generic Text Editor is the default editor independent which
content type is used.
Change-Id: I895c029ea8d4b92dee51e6dec351a56733e2a7ba
Signed-off-by: Holger Voormann <eclipse@voormann.de>
diff --git a/bundles/org.eclipse.wst.jsdt.ui/plugin.xml b/bundles/org.eclipse.wst.jsdt.ui/plugin.xml
index b89fe5c..e16cd54 100755
--- a/bundles/org.eclipse.wst.jsdt.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.jsdt.ui/plugin.xml
@@ -584,6 +584,13 @@
</participant>
</extension>
+ <!-- For .js files use the Generic Text Editor to enable JavaScript support via Eclipse Wild Web Developer (see bug 573902) -->
+ <extension point="org.eclipse.ui.editors">
+ <editorContentTypeBinding
+ contentTypeId="org.eclipse.wst.jsdt.core.jsSource"
+ editorId="org.eclipse.ui.genericeditor.GenericEditor"/>
+ </extension>
+
<extension
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
<target