Community
Participate
Working Groups
I am not sure if this is the right component to assign this enhancement request to. If it isn't I apologize. My request is that I'd like to see import completion when editing JSPs. It'd be nice to have that consistency among JSPs and Java files.
Is that the same as bug 86656? Or did you mean something different?
Let's put in JSP component, and no, Phil. I suspect this is more similar to the "organize imports" ... and/or that Java editor will insert whole (new) import statement if you complete a classname. So, for example, you could name just a class in <jsp:useBean class="|"> and an appropriate <%@page import="|"%> be inserted at the top of the page. We considered this before, but quickly gave up since it requires multiple Edits to be create, applied, translated ... and its all has to be pretty smart (several "round trips" to and from translated java to original JSP source ... maybe in 1.5?
I coded up part of this (already in HEAD) If you content assist in <% List| %> an import will be added for: <%@page import="java.util.List"%> after the document root element. <jsp:useBean class="|"> uses a different content assist processor, so I'll have to fix that too. On a related note, I also added completion for <%@page import="java.uti|"%>, where package names and Types will be proposed.
This is still an interesting idea, but we don't have people to work on this just now. We would accept high quality patches, though.
This is done in WTP 3.2. to some extent. If you use content assist to insert a Java class in a JSP then the needed import is automatically added. There is also content assist in the case of: <%@page import="java.util.|" %>
Hi Dan, Analyzing the current support of content assist in jsp files, can you please elaborate on what else do you feel should be added? Currently the three cases stated here is supported by content assist in WTP3.2: 1. <% List| %> 2. <jsp:useBean class="|"> 3. <%@page import="java.util.|" %>
I didn't realize this bug was still open! From what I recall the main use case for me was #3. Personally, I would consider this bug resolved. -Dan (In reply to comment #6) > Hi Dan, > Analyzing the current support of content assist in jsp files, can you please > elaborate on what else do you feel should be added? > > Currently the three cases stated here is supported by content assist in WTP3.2: > 1. <% List| %> > 2. <jsp:useBean class="|"> > 3. <%@page import="java.util.|" %>
Resolving based on submitter's comments. Thanks!