Bug 322729: Define a new content type "XML Document" and use this
content type as sub-type for DITA and DocBook.
Signed-off-by: Florian Thienel <florian@thienel.org>
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/META-INF/MANIFEST.MF b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/META-INF/MANIFEST.MF
index 814fa68..b27d9fc 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/META-INF/MANIFEST.MF
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/META-INF/MANIFEST.MF
@@ -5,6 +5,7 @@
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.wst.xml.vex.dita;singleton:=true
Require-Bundle: org.eclipse.wst.xml.vex.core;bundle-version="[0.5.0,1.0.0)",
- org.eclipse.wst.xml.vex.ui;bundle-version="[0.5.0,1.0.0)"
+ org.eclipse.wst.xml.vex.ui;bundle-version="[0.5.0,1.0.0)",
+ org.eclipse.wst.xml.core
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.properties b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.properties
index 7b8358c..fb9035d 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.properties
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.properties
@@ -22,7 +22,7 @@
style.classed=DITA Classed
style.mapStyle=DITA Map
-contentType.name = DITA Content Type
-contentType.map.name = DITA Map Content Type
-contentType.ditaval.name = DITAVal Content Type
-contentType.topic.name = DITA Topic Content Type
\ No newline at end of file
+contentType.name = DITA
+contentType.map.name = DITA Map
+contentType.ditaval.name = DITAVal
+contentType.topic.name = DITA Topic
\ No newline at end of file
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.xml b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.xml
index 3b473be..3d9a5e3 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.xml
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.dita/plugin.xml
@@ -5,7 +5,7 @@
<!-- Registers DITA-related content types extensions as xml content-->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="org.eclipse.wst.xml.vex.ui.dita" name="%contentType.name"
- base-type="org.eclipse.core.runtime.xml" file-extensions="dita, ditamap, ditaval">
+ base-type="org.eclipse.wst.xml.vex.ui.XmlDocument" file-extensions="dita, ditamap, bookmap, ditaval">
</content-type>
<content-type id="org.eclipse.wst.xml.vex.ui.dita.map"
name="%contentType.map.name" base-type="org.eclipse.wst.xml.vex.ui.dita.map"
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.properties b/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.properties
index 1dc8856..225d9cb 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.properties
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.properties
@@ -14,3 +14,4 @@
doctype.docbook4_5=DocBook v4.5
style.docbook-plain=DocBook Plain
+contentType.name=DocBook v4.5
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.xml b/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.xml
index d82903a..3aefb51 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.xml
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.docbook/plugin.xml
@@ -2,6 +2,12 @@
<?eclipse version="3.2"?>
<plugin>
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type id="org.eclipse.wst.xml.vex.ui.docbook4_5" name="%contentType.name"
+ base-type="org.eclipse.wst.xml.vex.ui.XmlDocument" file-extensions="xml, docbook">
+ </content-type>
+ </extension>
+
<extension
id="docbook4_5"
name="%doctype.docbook4_5"
@@ -44,43 +50,7 @@
</rootElement>
</doctype>
</extension>
- <!--
- <extension
- id="sdocbook1_1"
- name="%doctype.sdocbook1_1"
- point="org.eclipse.wst.xml.vex.ui.doctypes">
- <doctype
- dtd="s1.1/sdocbook.dtd"
- outlineProvider="org.eclipse.wst.xml.vex.docbook.DocBookOutlineProvider"
- publicId="-//OASIS//DTD Simplified DocBook XML V1.1//EN"
- systemId="http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd">
- <rootElement
- name="article">
- </rootElement>
- <rootElement
- name="appendix">
- </rootElement>
- <rootElement
- name="sect1">
- </rootElement>
- <rootElement
- name="sect2">
- </rootElement>
- <rootElement
- name="sect3">
- </rootElement>
- <rootElement
- name="sect4">
- </rootElement>
- <rootElement
- name="sect5">
- </rootElement>
- <rootElement
- name="section">
- </rootElement>
- </doctype>
- </extension>
- -->
+
<extension
id="docbook-plain"
name="%style.docbook-plain"
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.properties b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.properties
index f6deede..00d28ff 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.properties
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.properties
@@ -85,3 +85,4 @@
menu.Column.MoveRight.name= Move Right
menu.Column.Remove.name= Remove
menu.Style.name= Style
+contentType.XmlDocument.name=XML Document
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.xml b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.xml
index dd4a0f0..f2e75ea 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.xml
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/plugin.xml
@@ -6,15 +6,27 @@
<extension-point id="styles" name="%extensionPoint.styles" schema="schema/style.exsd"/>
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.core.runtime.xml"
+ file-extensions="*.xml"
+ id="org.eclipse.wst.xml.vex.ui.XmlDocument"
+ name="%contentType.XmlDocument.name">
+ </content-type>
+ </extension>
+
<extension
point="org.eclipse.ui.editors">
<editor
name="%VexEditor.name"
- extensions="htm,html,xhtml,xml,pml"
+ extensions="xml"
icon="$nl$/vex16.gif"
class="org.eclipse.wst.xml.vex.ui.internal.editor.VexEditor"
contributorClass="org.eclipse.wst.xml.vex.ui.internal.editor.VexActionBarContributor"
id="org.eclipse.wst.xml.vex.ui.VexEditor">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.wst.xml.vex.ui.XmlDocument">
+ </contentTypeBinding>
</editor>
<editor
class="org.eclipse.wst.xml.vex.ui.internal.editor.VEXMultiPageEditorPart"
@@ -24,7 +36,7 @@
name="%VexEditor.multipage.name"
symbolicFontName="org.eclipse.wst.sse.ui.textfont">
<contentTypeBinding
- contentTypeId="org.eclipse.core.runtime.xml">
+ contentTypeId="org.eclipse.wst.xml.vex.ui.XmlDocument">
</contentTypeBinding>
</editor>
</extension>