Author: vrubezhny
Date: 2009-01-12 13:16:11 -0500 (Mon, 12 Jan 2009)
New Revision: 12999
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
JBIDE-3529 Fix org.jboss.tools.seam.ui.test.SeamUiAllTests@testSeamELContentAssist
Testing algorithm is fixed
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-12
17:08:23 UTC (rev 12998)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-12
18:16:11 UTC (rev 12999)
@@ -335,12 +335,14 @@
protected Set<String> getFilteredProposals(Set<String> proposals, String
filter) {
TreeSet<String> fSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- int dotIndex = getDotIndex(filter);
- for (String proposal : proposals) {
- if (getValidDotIndex(proposal) <= dotIndex) {
- proposal = proposal.replace(':', '.');
- if (proposal.startsWith(filter) ) {
- fSet.add(proposal);
+ if (filter != null) {
+ int dotIndex = getDotIndex(filter);
+ for (String proposal : proposals) {
+ if (getValidDotIndex(proposal) <= dotIndex) {
+ proposal = proposal.replace(':', '.');
+ if (proposal.startsWith(filter) ) {
+ fSet.add(proposal);
+ }
}
}
}
@@ -526,21 +528,12 @@
String clearedFilter = filter;
if (filter.startsWith("#{")) {
clearedFilter = filter.substring(2);
- } else if (filter.startsWith("#")) {
- clearedFilter = filter.substring(1);
} else {
- clearedFilter = "";
+ clearedFilter = null;
}
Set<String> filteredValidProposals =
getFilteredProposals(getPageValidProposals(), clearedFilter);
- if (filter.indexOf("#") == -1) {
- filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals,
"#{", "}");
- } else if (filter.indexOf("#{") == -1) {
- filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals,
"{", /*"}"*/"");
- }
-
-
ICompletionProposal[] result= null;
String errorMessage = null;
Show replies by date