drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/RuleCompletionProcessor.java
private Collection<ICompletionProposal> getMvelInstanceCompletionsFromJDT(final int documentOffset,
                                                                              final String prefix,
                                                                              Map<String, String> params,
                                                                              Class<?> lastType,
                                                                              boolean settersOnly) {
        if (lastType == null) {
            lastType = Object.class;
        }

        //FIXME: there is a small chance of var name collision using this arbitrary mvdrlofc as a variable name.
        //ideally the variable name should be inferred from the last member of the expression
        final String syntheticVarName = "mvdrlofc";

        String javaText = "\n" + lastType.getPackage().getName() + "." + CompletionUtil.getSimpleClassName(lastType) + " " + syntheticVarName + ";\n" + syntheticVarName + ".";
        final List<ICompletionProposal> list1 = new ArrayList<ICompletionProposal>();
        requestJavaCompletionProposals(javaText, prefix, documentOffset, params, list1);

        final List<ICompletionProposal> list = list1;

        Collection<ICompletionProposal> mvelList = RuleCompletionProcessor.mvelifyProposals(list, settersOnly);
        return mvelList;
    }
private Collection<ICompletionProposal> getMvelInstanceCompletionsFromJDT(final int documentOffset,
                                                                              final String prefix,
                                                                              Map<String, String> params,
                                                                              Class<?> lastType,
                                                                              boolean settersOnly) {
        if (lastType == null) {
            lastType = Object.class;
        }

        //FIXME: there is a small chance of var name collision using this arbitrary mvdrlofc as a variable name.
        //ideally the variable name should be inferred from the last member of the expression
        final String syntheticVarName = "mvdrlofc";

        String javaText = "\n" + lastType.getPackage().getName() + "." + CompletionUtil.getSimpleClassName(lastType) + " " + syntheticVarName + ";\n" + syntheticVarName + ".";
        final List<ICompletionProposal> list1 = new ArrayList<ICompletionProposal>();
        requestJavaCompletionProposals(javaText, prefix, documentOffset, params, list1);

        final List<ICompletionProposal> list = list1;

        Collection<ICompletionProposal> mvelList = RuleCompletionProcessor.mvelifyProposals(list, settersOnly);
        return mvelList;
    }
private Collection < ICompletionProposal > getMvelInstanceCompletionsFromJDT ( final int documentOffset , final String prefix , Map < String , String > params , Class < ? > lastType , boolean settersOnly ) { if ( lastType == null ) { lastType = Object . class ; } //FIXME: there is a small chance of var name collision using this arbitrary mvdrlofc as a variable name. //ideally the variable name should be inferred from the last member of the expression final String syntheticVarName = "mvdrlofc" ; String javaText = "\n" + lastType . getPackage ( ) . getName ( ) + "." + CompletionUtil . getSimpleClassName ( lastType ) + " " + syntheticVarName + ";\n" + syntheticVarName + "." ; final List < ICompletionProposal > list1 = new ArrayList < ICompletionProposal > ( ) ; requestJavaCompletionProposals ( javaText , prefix , documentOffset , params , list1 ) ; final List < ICompletionProposal > list = list1 ; Collection < ICompletionProposal > mvelList = RuleCompletionProcessor . mvelifyProposals ( list , settersOnly ) ; return mvelList ; }
/*
Completions for object instance members
/ * Completions for object instance members