Author: vrubezhny
Date: 2008-02-07 15:04:51 -0500 (Thu, 07 Feb 2008)
New Revision: 6186
Modified:
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1759 Empty CA if there is no space between
inverted commas in atribute value.
Issue is fixed
JUnit TestCase will follow
Modified:
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
===================================================================
---
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-07
17:37:41 UTC (rev 6185)
+++
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-07
20:04:51 UTC (rev 6186)
@@ -708,9 +708,11 @@
String text = contentAssistRequest.getText();
String matchString = contentAssistRequest.getMatchString();
- if (matchString.length() > StringUtils.strip(text).length() &&
- ( (matchString.startsWith("\"") &&
matchString.endsWith("\""))
- || (matchString.startsWith("'") &&
matchString.endsWith("\"")))) {
+ if (matchString.length() > StringUtils.strip(text).length() &&
+ ( (matchString.startsWith("\"") &&
matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") !=
matchString.lastIndexOf("\"")))
+ || (matchString.startsWith("'") &&
matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") !=
matchString.lastIndexOf("\""))))) {
return;
}