drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/RuleCompletionProcessor.java
public static boolean containsProposal(final Collection<ICompletionProposal> proposals, String newProposal) {
        for (ICompletionProposal prop : proposals) {
            String displayString = prop.getDisplayString();
            String[] existings = displayString.split(" ");
            if (existings.length == 0) {
                continue;
            }

            String[] newProposals = newProposal.split(" ");
            if (newProposals.length == 0) {
                continue;
            }

            if (existings[0].equals(newProposals[0])) {
                return true;
            }
        }
        return false;
    }
public static boolean containsProposal(final Collection<ICompletionProposal> proposals, String newProposal) {
        for (ICompletionProposal prop : proposals) {
            String displayString = prop.getDisplayString();
            String[] existings = displayString.split(" ");
            if (existings.length == 0) {
                continue;
            }

            String[] newProposals = newProposal.split(" ");
            if (newProposals.length == 0) {
                continue;
            }

            if (existings[0].equals(newProposals[0])) {
                return true;
            }
        }
        return false;
    }
Attempt to compare proposals of different types based on the tokenized display string

@param proposals
@param newProposal
@return true if the collection contains a proposal which matches the new Proposal.
The match is based on the first token based on a space split