[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Changing plugin from custom to xml file extension

Hi, i wrote a plugin for a new xml based filetype called mdl2e.
The plugin introduces a own validation, syntax highlighting, and filetype.

I now want to apply the same plugin for normal *.xml files.
I tried to change   file-extensions="mdl2e" in   file-extensions="xml"
 in the contentTypes extension point as well as in the  validator,
but the new syntax highlighting and validation don't work if the file has  a 
*.xml extension.
Can someone tell what I have to change in my plugin.xml to get it work with 
normal xml files?



<!-- MDLE2 Editor Plugin -->

<plugin
    id="iswarmide"
    name="Iswarmide Plug-in"
    version="1.0.0"
    provider-name="%Plugin.providerName"
    class="iswarmide.ISwarmIDEPlugin" >


<extension point="org.eclipse.core.runtime.contentTypes">
    <content-type
    file-extensions="mdl2e"
    priority="high"
    name="MDL2e Content Type"
    id="mdl2esource"
    base-type="org.eclipse.core.runtime.xml"
    default-charset="UTF-8">
    <describer
    class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
    <parameter
    name="element"
    value="mdl2esheet" />
</describer>
</content-type>
</extension>


<extension point="org.eclipse.wst.sse.core.modelHandler">
<modelHandler
default="false"
class="iswarmide.ModelHandlerForMDL2E"
associatedContentTypeId="iswarmide.mdl2esource"
id="mdl2esourcehandler">
</modelHandler>
</extension>

<extension point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
<adapterFactoryDescription 
class="iswarmide.AdapterFactoryProviderForMDL2E"/>
</extension>

<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
<sourceViewerConfiguration
class="iswarmide.StructuredTextViewerConfigurationMDL2E"
target="iswarmide.mdl2esource"
/>
</extension>

<extension
id="mdl2evalidator"
name="MDL2EValidator"
point="org.eclipse.wst.validation.validator">
<validator>
<filter
objectClass="org.eclipse.core.resources.IFile"
caseSensitive="false"
nameFilter="*.mdl2e">
</filter>
<contentTypeBinding contentTypeId="iswarmide.mdl2esource"/>
<helper class="org.eclipse.wst.xml.core.internal.validation.core.Helper"/>
<run
async="true"
class="iswarmide.MDL2EValidator"
enabled="true"
fullBuild="true"
incremental="true"
/>
</validator>
</extension>

<extension point="org.eclipse.wst.sse.ui.sourcevalidation">
<validator
scope="total"
class="iswarmide.MDL2EValidatorDelegator"
id="iswarmide.mdl2evalidatordelegator">
<contentTypeIdentifier id="iswarmide.mdl2esource">
<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
</contentTypeIdentifier>
</validator>
</extension>

<extension point="org.eclipse.wst.sse.ui.sourcevalidation">
<validator
scope="partial"
class="iswarmide.MDL2EMarkupValidator"
id="iswarmide.mdl2emarkupvalidator">
<contentTypeIdentifier id="iswarmide.mdl2esource">
<partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
<partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
</contentTypeIdentifier>
</validator>
</extension>
</plugin>



Regards

Axel