drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/DefaultCompletionProcessor.java
protected static boolean doesNotContainFieldCompletion(String completion, List<ICompletionProposal> completions) {
        if ( completion == null || completion.length() == 0 || completions == null ) {
            return false;
        }
        for ( Iterator<ICompletionProposal> iter = completions.iterator(); iter.hasNext(); ) {
            Object o = iter.next();
            if ( o instanceof AbstractJavaCompletionProposal ) {
                AbstractJavaCompletionProposal prop = (AbstractJavaCompletionProposal) o;
                String content = prop.getReplacementString();
                if ( completion.equals( content ) ) {
                    IJavaElement javaElement = prop.getJavaElement();
                    if ( javaElement instanceof ILocalVariable || javaElement instanceof IField ) {
                        return false;
                    }
                }
            }
        }
        return true;
    }
protected static boolean doesNotContainFieldCompletion(String completion, List<ICompletionProposal> completions) {
        if ( completion == null || completion.length() == 0 || completions == null ) {
            return false;
        }
        for ( Iterator<ICompletionProposal> iter = completions.iterator(); iter.hasNext(); ) {
            Object o = iter.next();
            if ( o instanceof AbstractJavaCompletionProposal ) {
                AbstractJavaCompletionProposal prop = (AbstractJavaCompletionProposal) o;
                String content = prop.getReplacementString();
                if ( completion.equals( content ) ) {
                    IJavaElement javaElement = prop.getJavaElement();
                    if ( javaElement instanceof ILocalVariable || javaElement instanceof IField ) {
                        return false;
                    }
                }
            }
        }
        return true;
    }
protected static boolean doesNotContainFieldCompletion ( String completion , List < ICompletionProposal > completions ) { if ( completion == null || completion . length ( ) == 0 || completions == null ) { return false ; } for ( Iterator < ICompletionProposal > iter = completions . iterator ( ) ; iter . hasNext ( ) ; ) { Object o = iter . next ( ) ; if ( o instanceof AbstractJavaCompletionProposal ) { AbstractJavaCompletionProposal prop = ( AbstractJavaCompletionProposal ) o ; String content = prop . getReplacementString ( ) ; if ( completion . equals ( content ) ) { IJavaElement javaElement = prop . getJavaElement ( ) ; if ( javaElement instanceof ILocalVariable || javaElement instanceof IField ) { return false ; } } } } return true ; }
/*
do we already have a completion for that string that would be either a local variable or a field?
/ * do we already have a completion for that string that would be either a local variable or a field?