if (state.getIDocument().getPartition(state.getOffset()).getType().equals(CFPartitionScanner.CF_SCRIPT)) {
CFDocument doc = ((ICFDocument) state.getIDocument()).getCFDocument();
CFNodeList funknodes = doc.getDocumentRoot().selectNodes(
"//ASTFunctionDeclaration[#startpos<" + state.getOffset() + "]");
if (funknodes.size() > 0) {
FunctionInfo funknode = (FunctionInfo) funknodes.get(funknodes.size() - 1);
Function func = doc.getFunctionByName(funknode.getFunctionName());
if (func != null) {
params = func.getParameters();
return prepareProposals(state, params);
} else {
return null;