| Summary: | templates in the Ant editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | John-Mason P. Shackelford <jpshack> | ||||
| Component: | Ant | Assignee: | John-Mason P. Shackelford <jpshack> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | danrubel, Darin_Swanson | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | 3.0 M8 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 11020 | ||||||
| Bug Blocks: | 49384 | ||||||
| Attachments: |
|
||||||
|
Description
John-Mason P. Shackelford
As I see it, this task breaks down into the following items: 1. Add an extension point for adding templates to the ant editor. (Unless Tom is adding a generic extension point that we can use.) 2. Add a preference page for defining templates. 3. Add the available templates into Content Assist. 4. Insert the templates into the editor itself, w/ linking support, etc. I'd suggest we proceed by tackling 3. & 4. so that we can get something in before the feature freeze. We may need to do 1. on the way--but that part is no brainer. I wouldn't think 3. would involve much effort either, though I am still fairly green. Tom's patch in bug 11020 should give us enough example code to get moving on 4. 5. Add a bunch of helpful templates for commonly used tasks and type. Created attachment 8552 [details]
getting started on template support
This patch adds a single template to the code completion: <fileset>. The
proposal appears to work only under the <project> element and not inside
<target>s.
Ant's content assist has the notion of modes-- task mode, attribute mode, etc. We could use several code template contexts to correspond to these modes. I suspect that most templates will be relevant to task mode, however we'll also have templates for the project, targets, as well as arbitrary snippets (for which I don't actually have a use case at the moment, but since users will be able to add templates via the preferences this is probably a good idea). I have added the extension point and the support for determining the templates. See AntTemplates. One template has been added via the extension point in Ant ui: fileset. I added the template icon for the template proposals. Changes to AntTemplates, AntEditorCompletionProcessor, AntUIImages, IAntUIConstants. I added the antTemplates.exsd schema file, changes to plugin.xml and plugin.properties. Note that the additional proposal info is not working? I added a template for <property name="" value=""/> Per our conversation I assume we'll do nothing more on this until M9 when we address the formatting templates as they are inserted and adding templates for common tasks and types. I will likely detail the remaing enhancements/problems in new bug reports so we can outline in this bug report the support that we do have. I have added the following for the remaining work on the template support. I will address these in M9. bug 55355 investigate new template extension point for ant editor bug 55356 templates should be formatted on insert bug 55357 templates do not appear in content assist when expected bug 55358 Create templates for commonly used tasks and types. With bug 55355, this bug really becomes obsolete. I created bug 55435 for the preference page enhancement. We will run with the new set of bug reports. (Kindof verified). |