Bug 259721 - [editor] Add Extension point for Content Assist
Summary: [editor] Add Extension point for Content Assist
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsl (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.2 M3   Edit
Assignee: David Carver CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords: api, plan
Depends on:
Blocks: 287500
  Show dependency tree
 
Reported: 2008-12-28 11:58 EST by David Carver CLA
Modified: 2009-10-07 22:55 EDT (History)
3 users (show)

See Also:


Attachments
XSL Content Assist Processor Extension (33.52 KB, patch)
2009-09-21 18:40 EDT, David Carver CLA
no flags Details | Diff
Working Content Assistance with Unit Tests for Extension Point (44.98 KB, patch)
2009-09-21 23:26 EDT, David Carver CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2008-12-28 11:58:52 EST
XSL Tools needs an extension point mechanism for adopters to easily add additional content assistance or customization of the content assistance that exists.  JDT provides this through their proposals extension point, and is able to allow the user to enable and disable proposals.

This will allow easier customization of the editor where needed.   The extension point should probably be version aware so that the proposals can be limited to particular versions of XML.

An example of a possible extension would be for EXSLT functionality for XSLT 1.0.
Comment 1 David Carver CLA 2009-04-30 14:24:43 EDT
mass update to 3.1 target due to movement from wtp incubator to wtp source editing lost the original milestones.
Comment 2 David Carver CLA 2009-05-11 22:59:15 EDT
migrating prior 3.1 enhancements for future for further triage and planning.
Comment 3 David Carver CLA 2009-09-02 15:24:30 EDT
Assigning inbox items to triaged since these have all be triaged.
Comment 4 David Carver CLA 2009-09-21 18:40:02 EDT
Created attachment 147744 [details]
XSL Content Assist Processor Extension

This migrates the existing XSL Content Assistance to an extension point.  This allows other XSL Content Assistance processors to be contributed.
Comment 5 David Carver CLA 2009-09-21 23:26:22 EDT
Created attachment 147753 [details]
Working Content Assistance with Unit Tests for Extension Point
Comment 6 David Carver CLA 2009-09-21 23:28:30 EDT
Adding Paul Glezen as this extension point may be of use in addition to work that will happen on bug 289498.
Comment 7 Paul Glezen CLA 2009-09-22 13:19:43 EDT
Lately I've been using XPath Templates to provide poor-man's content assist.  It works pretty well in many cases.  But one area where a plug-in would help is establishing the additional context for content assist.  For example, the XPath templates know when I'm inside a "select" attribute of a "variable" tag.  So it's active there.  But it doesn't know when I'm in an attribute of a custom extension element that accepts XPath expressions.  For that, the XPath templates are inactive.

But a plug-in with knowledge of which extended attributes accept XPath expressions could remedy this.
Comment 8 David Carver CLA 2009-09-22 13:47:59 EDT
(In reply to comment #7)
> Lately I've been using XPath Templates to provide poor-man's content assist. 
> It works pretty well in many cases.  But one area where a plug-in would help is
> establishing the additional context for content assist.  For example, the XPath
> templates know when I'm inside a "select" attribute of a "variable" tag.  So
> it's active there.  But it doesn't know when I'm in an attribute of a custom
> extension element that accepts XPath expressions.  For that, the XPath
> templates are inactive.
> 
> But a plug-in with knowledge of which extended attributes accept XPath
> expressions could remedy this.

Correct.  I'll have an example additional XSLT XPath contributions.  I'll be adding an EXSLT implementation that can be used as a guide for adding additional XPath functions that are context aware a bit. But for now the Templates approach is the way to go, until we get the extension points in place.
Comment 9 David Carver CLA 2009-09-25 14:50:26 EDT
Code for this has been checked in.  Will leave this open for a bit, to allow time for adopters to provide some feedback.  All existing and new unit tests pass in the build, and have been released to the build system.
Comment 10 David Carver CLA 2009-10-07 22:55:09 EDT
Updated SDK documentation to include the new extension point.  Code seems to be working, and EXSLT example is included.  See bug 243579 for more information on that contribution status.