Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
index 71d833c934..05f703e72a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
@@ -26,9 +26,9 @@ import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.utility.filter.Filter;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
+import org.eclipse.jpt.common.utility.predicate.Predicate;
import org.eclipse.jpt.jaxb.core.JaxbProject;
import org.eclipse.jpt.jaxb.core.JaxbProjectManager;
import org.eclipse.jpt.jaxb.core.JaxbWorkspace;
@@ -122,7 +122,7 @@ public class JaxbJavaCompletionProposalComputer
// the context's "token" is really a sort of "prefix" - it does NOT
// correspond to the "start" and "end" we get below...
char[] prefix = cc.getToken();
- Filter<String> filter = this.buildPrefixFilter(prefix);
+ Predicate<String> filter = this.buildPrefixFilter(prefix);
// the token "kind" tells us if we are in a String literal already - CompletionContext.TOKEN_KIND_STRING_LITERAL
int tokenKind = cc.getTokenKind();
// the token "start" is the offset of the token's first character
@@ -156,7 +156,7 @@ public class JaxbJavaCompletionProposalComputer
return proposals;
}
- private Iterable<String> buildCompletionProposals(JaxbContextNode javaNode, int pos, Filter<String> filter) {
+ private Iterable<String> buildCompletionProposals(JaxbContextNode javaNode, int pos, Predicate<String> filter) {
return IterableTools.filter(javaNode.getCompletionProposals(pos), filter);
}
@@ -201,21 +201,21 @@ public class JaxbJavaCompletionProposalComputer
return PlatformTools.getAdapter(PlatformUI.getWorkbench(), JaxbWorkbench.class);
}
- private Filter<String> buildPrefixFilter(char[] prefix) {
+ private Predicate<String> buildPrefixFilter(char[] prefix) {
return (prefix == null) ?
- Filter.Transparent.<String>instance() :
+ Predicate.True.<String>instance() :
new IgnoreCasePrefixFilter(prefix);
}
private static class IgnoreCasePrefixFilter
- implements Filter<String>
+ implements Predicate<String>
{
private final String prefix;
IgnoreCasePrefixFilter(char[] prefix) {
super();
this.prefix = new String(prefix);
}
- public boolean accept(String s) {
+ public boolean evaluate(String s) {
return StringTools.startsWithIgnoreCase(s, this.prefix);
}
}

Back to the top