| Summary: | [ca] JSP Java content assist should auto-import necessary class | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Phillip Avery <pavery> | ||||
| Component: | jst.jsp | Assignee: | Phillip Avery <pavery> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | ms | ||||
| Version: | 1.5 | ||||||
| Target Milestone: | 1.5 M5 | ||||||
| Hardware: | All | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Phillip Avery
This will be a good and important feature for JSP editing, compared with the current behavior, which is to insert the fully qualified type name when selected via content assist. Additionally, the JSP page import directive should be updated when classes are refactored. I believe this works for class renaming currently, but it does not work for moving classes between packages. Maybe this should be adressed as a separate defect/feature request? this is a huge missing component? how is it that this hasn't happened? One place we could do this is JSPProposalCollector#createJavaCompletionProposal() If we detect that the name is fully qualified, we can create a special proposal that add the import (if it's not there already...). We should look @ how JDT does it. I checked a fix for this into HEAD. In JSPProposalCollector I detect if the proposal is an (undesirable) fully qualified Type name. I then create a special completion proposal that inserts the import statement (AutoImportProposal). Created attachment 33029 [details]
Bug in the auto-import implementation when html tags in page
I checked the feature in the build I200601130122 (January 13, 2006).
First, what a pleasure to see the auto import feature implemented : Thanks !!!
In a blank new file, the auto-import runs well.
But when the file is containing HTML tags, import directive is added the line up the first html tag and the cursor is left inside the import directive.
This change is a bulk update of all _un_targeted, fixed, resolved bugs upon release of M5. This particular bug _might_ have been fixed earlier than M5. (Feel free to correct). This is part of a mass update to close out all stale WTP resolved bugs from the 1.0.x and 1.5.0 timeframe. If you feel this bug was closed inappropriately, please reopen. Thanks, John Lanuti |