- This topic has 5 replies, 2 voices, and was last updated 19 years, 5 months ago by
Riyad Kalla.
-
AuthorPosts
-
Lonnie HarbourMemberI’m assuming this isn’t a bug, but an add import (CTRL+SHFT+M) function for JSPs (similar to the one for Java classes) would be great while editing JSPs, although obviously the format of the added import would be something like:
<%@ page import=”java.sql.Connection” %>
rather than:
import java.sql.Connection;
I am currently using 4.1GA with eclipse 3.1.2. Thanks for a great product.
March 2, 2006 at 7:06 pm #247648
Riyad KallaMemberIf you autocomplete class name, an import exactly as you state will be added to your page for you. Try it:
<%
ArrayLis|<– invoke Autocomplete, select “java.util.ArrayList” and hit Enter.
%>March 3, 2006 at 11:43 am #247699
Lonnie HarbourMemberOh no, I know about autocomplete, and it works great. I’m just lazy. I’d rather just type the class name and a hot key combination (like in standard Java files) instead of typing the package name. Also, if you’re not sure exactly what the package name is, using the import function while editing Java files will allow you to pick from a list of packages. This would make editing java code in JSPs more consistent with java classes.
March 3, 2006 at 11:53 am #247703
Riyad KallaMemberI’m confused now… what you describe and how I’m understanding it is what our JSP editor does. Did you try my example? Just create a new JSP page using File > New > JSP, then paste this in there, exactly as is:
<% ArrayLis %>
then put your cursor after the “s” and hit CTRL-Space, you should be prompted with choices. Select ArrayList from the java.util package and hit enter. Your import will be added to the top of the page and ArrayList will be autocompleted, just like the Java Editor.
Ok so given that, please describe step-by-step the usability you are looking for, cause I’m not seeing the diff between this and what you typed.
March 3, 2006 at 12:07 pm #247705
Lonnie HarbourMemberAwesome. That works perfectly. The feature I was trying to describe is what happens when you open a java class without an import for java.util.ArrayList and type:
ArrayList
And then control+shift+m. That doesn’t work in the JSP editor. But no worries, I actually like your way better and will adopt it! Thanks.
March 3, 2006 at 5:10 pm #247721
Riyad KallaMemberAhh ok cool, glad it’s working now!
-
AuthorPosts