Adding Content Assist To HTML Editor from xsd/dtd? [message #188540] |
Fri, 23 February 2007 21:54 |
Eclipse User |
|
|
|
Originally posted by: jhall.insurancesystems.ca
Hi,
I've have my own tag based language described by an xsd or DTD that I would
like to add to the content assist in the HTML editor. ( It may be activated
anywhere in the HTML source).
I cannot have the doctype or namespace defined.
So far I've figured out to add my own content type that has a base type
org.eclipse.wst.html.core.htmlsource.
I use the org.eclipse.wst.sse.ui.editorConfiguration extension point using
the sourceViewerConfiguration to add my own class, that extends the
org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L, and targets
my new content type.
Here is my plugin xml:
<plugin>
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type file-extensions="wwp"
name="wwpeditor.wwpsource"
id="wwpeditor.wwpsource"
base-type="org.eclipse.wst.html.core.htmlsource">
</content-type>
</extension>
<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
<sourceViewerConfiguration
class="com.isi.wwpeditor.StructuredTextViewerConfigurationWWP "
target="wwpeditor.wwpsource"/>
</extension>
</plugin>
My StructuredTextViewerConfigurationWWP.class
overrides the
protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer
sourceViewer, String partitionType);
method and I add my own implementation of IContentAssistProcessor on every
invocation.
But this is where I have trouble. I'm not sure the best way to add the
processor based off the dtd/schema?
SO I guess my real question is; is there an easy way to create an instance
of IContentAssistProcessor from my own .xsd schema easily at this point?
I've searched through all the forums and I'm having a hard time with this
one.
Thanks in advance,
Jules
|
|
|
Powered by
FUDForum. Page generated in 0.02969 seconds