Re: [pdt-dev] Using ModelQueryExtension
I suggest you to ask Webtools guys. You can find them either in their newsgroups or in mailing list (wtp-dev) 2008/11/26 <[EMAIL PROTECTED]>: > Thanks for the reply! > > That's how I've declared the extension, but I don't see any changes at all > and my class is never called. > > This is my first Eclipse plugin, so if anyone could explain to me the > mechanism that fires this code, that might help. Even in the JSP and XSD > packages that use this code, I haven't been able to find the place where it > is invoked (or where the listener is added). > > Thanks, > > Jim > > Sent from my Verizon Wireless BlackBerry > > -Original Message- > From: "Michael Spector" <[EMAIL PROTECTED]> > > Date: Wed, 26 Nov 2008 10:16:57 > To: PDT Developers > Subject: Re: [pdt-dev] Using ModelQueryExtension > > > Hi, > > The extension must be declared as follows in your plugin.xml: > > > class="org.fhtml.eclipse.editors.FhtmlModelQueryExtension" >contentType="org.eclipse.wst.html.core.htmlsource"> > > > > BTW, do you see extended elements in regular HTML editor? > > > On Wed, Nov 26, 2008 at 8:02 AM, Jim Kremens <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm trying to extend PDT to support custom html tags and attributes. >> After some confusion, I've implemented the >> org.eclipse.wst.xml.core.modelQueryExtensions extension point and >> built a class that extends ModelQueryExtension (thanks for the tip >> Roy!): >> >> >> package org.fhtml.eclipse.editors; >> >> import java.util.ArrayList; >> import java.util.List; >> >> import >> org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension; >> import org.w3c.dom.Element; >> import org.w3c.dom.Node; >> >> public class FhtmlModelQueryExtension extends ModelQueryExtension { >> >> public FhtmlModelQueryExtension() { >> System.out.print("NEVER CALLED\n"); >> } >> >> public String[] getAttributeValues(Element e, String namespace, >> String name) { >> //See XSDModelQueryExtension for an example >> implementation of this... >> } >> >> } >> >> >> But my class is never invoked. I've looked at other implementations >> of ModelQuery, like in the XSD and JSP packages, and unfortunately, I >> can't discern when these extensions are actually called. >> >> Has anyone had success with this extension point? Also, if anyone >> knows of any real documentation on the topic, that would be great as >> well. As far as I can tell, there's almost nothing, as this is meant, >> for now, to be an internal extension point. >> >> Thanks, >> >> Jim Kremens >> ___ >> pdt-dev mailing list >> pdt-dev@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/pdt-dev >> > > > > -- > Michael > ___ > pdt-dev mailing list > pdt-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/pdt-dev > > ___ > pdt-dev mailing list > pdt-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/pdt-dev > > -- Michael ___ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev
Re: [pdt-dev] Using ModelQueryExtension
Thanks for the reply! That's how I've declared the extension, but I don't see any changes at all and my class is never called. This is my first Eclipse plugin, so if anyone could explain to me the mechanism that fires this code, that might help. Even in the JSP and XSD packages that use this code, I haven't been able to find the place where it is invoked (or where the listener is added). Thanks, Jim Sent from my Verizon Wireless BlackBerry -Original Message- From: "Michael Spector" <[EMAIL PROTECTED]> Date: Wed, 26 Nov 2008 10:16:57 To: PDT Developers Subject: Re: [pdt-dev] Using ModelQueryExtension Hi, The extension must be declared as follows in your plugin.xml: BTW, do you see extended elements in regular HTML editor? On Wed, Nov 26, 2008 at 8:02 AM, Jim Kremens <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to extend PDT to support custom html tags and attributes. > After some confusion, I've implemented the > org.eclipse.wst.xml.core.modelQueryExtensions extension point and > built a class that extends ModelQueryExtension (thanks for the tip > Roy!): > > > package org.fhtml.eclipse.editors; > > import java.util.ArrayList; > import java.util.List; > > import > org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension; > import org.w3c.dom.Element; > import org.w3c.dom.Node; > > public class FhtmlModelQueryExtension extends ModelQueryExtension { > > public FhtmlModelQueryExtension() { > System.out.print("NEVER CALLED\n"); > } > > public String[] getAttributeValues(Element e, String namespace, > String name) { > //See XSDModelQueryExtension for an example > implementation of this... > } > > } > > > But my class is never invoked. I've looked at other implementations > of ModelQuery, like in the XSD and JSP packages, and unfortunately, I > can't discern when these extensions are actually called. > > Has anyone had success with this extension point? Also, if anyone > knows of any real documentation on the topic, that would be great as > well. As far as I can tell, there's almost nothing, as this is meant, > for now, to be an internal extension point. > > Thanks, > > Jim Kremens > ___ > pdt-dev mailing list > pdt-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/pdt-dev > -- Michael ___ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev ___ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev
Re: [pdt-dev] Using ModelQueryExtension
Hi, The extension must be declared as follows in your plugin.xml: BTW, do you see extended elements in regular HTML editor? On Wed, Nov 26, 2008 at 8:02 AM, Jim Kremens <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to extend PDT to support custom html tags and attributes. > After some confusion, I've implemented the > org.eclipse.wst.xml.core.modelQueryExtensions extension point and > built a class that extends ModelQueryExtension (thanks for the tip > Roy!): > > > package org.fhtml.eclipse.editors; > > import java.util.ArrayList; > import java.util.List; > > import > org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension; > import org.w3c.dom.Element; > import org.w3c.dom.Node; > > public class FhtmlModelQueryExtension extends ModelQueryExtension { > > public FhtmlModelQueryExtension() { > System.out.print("NEVER CALLED\n"); > } > > public String[] getAttributeValues(Element e, String namespace, > String name) { > //See XSDModelQueryExtension for an example > implementation of this... > } > > } > > > But my class is never invoked. I've looked at other implementations > of ModelQuery, like in the XSD and JSP packages, and unfortunately, I > can't discern when these extensions are actually called. > > Has anyone had success with this extension point? Also, if anyone > knows of any real documentation on the topic, that would be great as > well. As far as I can tell, there's almost nothing, as this is meant, > for now, to be an internal extension point. > > Thanks, > > Jim Kremens > ___ > pdt-dev mailing list > pdt-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/pdt-dev > -- Michael ___ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev
[pdt-dev] Using ModelQueryExtension
Hi all, I'm trying to extend PDT to support custom html tags and attributes. After some confusion, I've implemented the org.eclipse.wst.xml.core.modelQueryExtensions extension point and built a class that extends ModelQueryExtension (thanks for the tip Roy!): package org.fhtml.eclipse.editors; import java.util.ArrayList; import java.util.List; import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension; import org.w3c.dom.Element; import org.w3c.dom.Node; public class FhtmlModelQueryExtension extends ModelQueryExtension { public FhtmlModelQueryExtension() { System.out.print("NEVER CALLED\n"); } public String[] getAttributeValues(Element e, String namespace, String name) { //See XSDModelQueryExtension for an example implementation of this... } } But my class is never invoked. I've looked at other implementations of ModelQuery, like in the XSD and JSP packages, and unfortunately, I can't discern when these extensions are actually called. Has anyone had success with this extension point? Also, if anyone knows of any real documentation on the topic, that would be great as well. As far as I can tell, there's almost nothing, as this is meant, for now, to be an internal extension point. Thanks, Jim Kremens ___ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev