Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Binding a CM ModelQuery to a filename extension?
Binding a CM ModelQuery to a filename extension? [message #56874] Tue, 21 December 2004 06:48 Go to next message
Eclipse UserFriend
Originally posted by: christianessl.yahoo.de

I want to make a XML editor for a XML dialect which makes Java object
trees (a XUL variant). I want to use the very cool wst XMLEditor. Because
the XULs ?schema? is defined by the java classes in the project I first
thought of adding an extension to
org.eclipse.wst.common.contentmodel.documentFactories.

However when I browsed through the code of the org.eclipse.wst.xml.core
plugin I found that it would be easier if I could directly implement
org.eclipse.wst.common.contentmodel.modelquery.ModelQuery or
org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAss ociationProvider
and associate it with a specific file-extension. The xmleditor should use
this ModelQuery based on the file-extension.

Is this possible or do I have to define a new editor based on XMLEditor.
It would be great if anyone could help.
Re: Binding a CM ModelQuery to a filename extension? [message #57326 is a reply to message #56874] Wed, 22 December 2004 23:47 Go to previous message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
Christian Essl wrote:

> I want to make a XML editor for a XML dialect which makes Java object
> trees (a XUL variant). I want to use the very cool wst XMLEditor. Because
> the XULs ?schema? is defined by the java classes in the project I first
> thought of adding an extension to
> org.eclipse.wst.common.contentmodel.documentFactories.

> However when I browsed through the code of the org.eclipse.wst.xml.core
> plugin I found that it would be easier if I could directly implement
> org.eclipse.wst.common.contentmodel.modelquery.ModelQuery or
> org.eclipse.wst.common.contentmodel.modelquery.ModelQueryAss ociationProvider
> and associate it with a specific file-extension. The xmleditor should use
> this ModelQuery based on the file-extension.

> Is this possible or do I have to define a new editor based on XMLEditor.
> It would be great if anyone could help.

Yes it's definitely possible. It sounds like you want to provide a
CMDocumentFactory that can 'adapt' your Java classes to provide 'schema'
information to the XML editor. If you wanted to provide you own ModelQuery
that's possible too... but it may not be quite as easy to configure the
editor to use it (but it's definitely doable). I'll be happy to help you
out in either case.

I'd like to better understand how you'd like to extend our tools and what
your requirements are. Can you please post some more information about
the problem your truing to solve and your requirements? In future
milestones we're going to be focusing on the APIs and extension points we
provide. It sounds like you have a good use case that we should take into
consideration.

BTW... just a friendly warning that web tools project's API's have not
'hardened' yet. So expect API breaking changes for at least the next
couple of milestones. We'll explicitly state when our API's are fully
baked and ready for consumption.
Previous Topic:TEST
Next Topic:Call for WTP M2 Feedback
Goto Forum:
  


Current Time: Sun Jun 30 11:43:28 GMT 2024

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

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

Back to the top