Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Using ModelQueryExtension


Hi Jim,

This extension point is used to provide guided editing (content assist).   The WSDL and XML Schema editors use this extension point and you can invoke this code by doing a CTRL-Space from any of the 'reference' attribute values (like type or ref) in the Source view.  If you need further assistance, let's continue this discussion in the WTP newsgroups.


Thanks,
Keith Chong



"Jim Kremens" <kremens@xxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

11/26/2008 10:27 PM

Please respond to
"General discussion of project-wide or architectural issues."        <wtp-dev@xxxxxxxxxxx>

To
wtp-dev@xxxxxxxxxxx
cc
Subject
[wtp-dev] Using ModelQueryExtension





Hi all,

I'm having trouble implementing the
org.eclipse.wst.xml.core.modelQueryExtensions extension point.

I've declared it as follows in my plugin.xml:

<extension point="org.eclipse.wst.xml.core.modelQueryExtensions">
    <modelQueryExtension
          class="org.fhtml.eclipse.editors.MyModelQueryExtension"
          contentType="org.eclipse.wst.html.core.htmlsource">
    </modelQueryExtension>
</extension>

and also built a class that extends ModelQueryExtension:

public class MyModelQueryExtension extends ModelQueryExtension {

     public MyModelQueryExtension() {
             System.out.print("NEVER CALLED\n");
     }

     public String[] getAttributeValues(Element e, String namespace,
String name) {
             //See XSDModelQueryExtension for example...
     }

}



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).

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
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top