Author: vrubezhny
Date: 2010-10-18 11:52:19 -0400 (Mon, 18 Oct 2010)
New Revision: 25905
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java
Log:
JBIDE-7195
org.jboss.tools.jsf.ui.test fails
CA Proposals comparing is fixed
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java 2010-10-18
15:19:58 UTC (rev 25904)
+++
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java 2010-10-18
15:52:19 UTC (rev 25905)
@@ -118,7 +118,16 @@
String replacementString = ap.getReplacementString().toLowerCase();
if (replacementString.equalsIgnoreCase(proposalName)) return true;
+
// For a tag proposal there will be not only the the tag name but all others
characters like default attributes, tag ending characters and so on
+ if (replacementString.indexOf("/>") != -1) {
+ replacementString = replacementString.substring(0,
replacementString.indexOf("/>"));
+ }
+ if (replacementString.indexOf('>') != -1) {
+ replacementString = replacementString.substring(0,
replacementString.indexOf('>'));
+ }
+ if (replacementString.equalsIgnoreCase(proposalName)) return true;
+
String[] replacementStringParts = replacementString.split(" ");
//$NON-NLS-1$
if (replacementStringParts != null && replacementStringParts.length > 0)
{
if (replacementStringParts[0].equalsIgnoreCase(proposalName)) return true;