Community
Participate
Working Groups
using a wtp 3.0m4 build from dec 6 1. create a new jsp 2. add a jsp:usebean tag with an id containing a space like id="my space" 3. add the type attribute and start typing something then invoking content assist. You get the below exception: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1088) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.appendUseBeanToBuffer(JSPTranslator.java:2255) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.appendToBuffer(JSPTranslator.java:2069) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.appendToBuffer(JSPTranslator.java:2034) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translateUseBean(JSPTranslator.java:2536) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translateXMLNode(JSPTranslator.java:1280) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translateRegionContainer(JSPTranslator.java:1018) at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translate(JSPTranslator.java:863) at org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter.getJSPTranslation(JSPTranslationAdapter.java:127) at org.eclipse.jst.jsp.ui.internal.contentassist.JSPCompletionProcessor.computeCompletionProposals(JSPCompletionProcessor.java:83) at org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaContentAssistProcessor.computeCompletionProposals(JSPJavaContentAssistProcessor.java:95) at org.eclipse.jst.jsp.ui.internal.contentassist.JSPContentAssistProcessor.getJSPJavaCompletionProposals(JSPContentAssistProcessor.java:1061) at org.eclipse.jst.jsp.ui.internal.contentassist.JSPContentAssistProcessor.getImportProposals(JSPContentAssistProcessor.java:945) at org.eclipse.jst.jsp.ui.internal.contentassist.JSPContentAssistProcessor.computeCompletionProposals(JSPContentAssistProcessor.java:936) at org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor.computeCompletionProposals(CompoundContentAssistProcessor.java:300) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1808)
Created attachment 93329 [details] Patch to fix StringIndexOutOfBounds Checks for the existence of the opening parenthesis before using it as an index.
Created attachment 93346 [details] different direction - report the problem Hmmm, actually I think it's better if we can report the problem(s) instead of just working around them. Nick, please use this patch as a starting point and flesh out the other cases in the spec that I've missed.
Apparently I've dropped a number of //$NON-NLS-1$ markers as well...
Created attachment 93480 [details] Adding support for more validation scenarios Addressed in this patch: 1) Clearing previous validation messages--everything was being appended before 2) Added support for using the beanName attribute in the jsp:useBean tag 3) Expanded on the previous patch's validations to include a. Validate that both class and beanName are not both defined b. Validate that a type for the bean can be resolved (either by explicit declaration through the type attribute or through inferring from the class attribute) These changes are on top of those found in attachment 93346 [details], so that attachment should be made obsolete.
Created attachment 93621 [details] Fixed missing //$NON-NLS-1$ Fixed up the missing //$NON-NLS-1$
Committed.
Reopening bug. Patch code differs from what was committed to the repository causing bug 225798.
Created attachment 94901 [details] patch Patch to add back missing line of code.
Fixed.
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.
Verified in I20080429053810. Closing.