[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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).  


Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Michael Spector" <spektom@xxxxxxxxx>

Date: Wed, 26 Nov 2008 10:16:57 
To: PDT Developers<pdt-dev@xxxxxxxxxxx>
Subject: Re: [pdt-dev] Using ModelQueryExtension


The extension must be declared as follows in your plugin.xml:

<extension point="org.eclipse.wst.xml.core.modelQueryExtensions">

BTW, do you see extended elements in regular HTML editor?

On Wed, Nov 26, 2008 at 8:02 AM, Jim Kremens <kremens@xxxxxxxxx> 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@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev

pdt-dev mailing list