Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Adding Content Assist To HTML Editor from xsd/dtd?
Adding Content Assist To HTML Editor from xsd/dtd? [message #188540] Fri, 23 February 2007 21:54
Eclipse UserFriend
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
Previous Topic:Ant build using remote JVM hangs.
Next Topic:winners of the EC2007 short talk / demo submission incentive.
Goto Forum:
  


Current Time: Sat Apr 20 01:17:03 GMT 2024

Powered by FUDForum. Page generated in 0.02546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top