def completeFunction(self, text, line, begidx, endidx): if self.__completer is not None: if callable(self.__completer): model = self.getModelForFunction() return self.__completer(model, text, line, begidx, endidx) else: key = extractFullArgument(line, endidx) return autoCompleteListWithSeparator(key, self.__completer) return []
def completeLs(self, text, line, begidx, endidx): arguments = splitArguments(line) last_argument = extractFullArgument(line, endidx) if len(arguments) == 1 and len(text) == 0: ert = self.ert() if ert is not None: return [ert.getModelConfig().getEnspath() + os.path.sep] else: return getPossibleFilenameCompletions("") elif len(arguments) == 2 and len(last_argument) > 0: return getPossibleFilenameCompletions(last_argument) elif len(arguments) == 3 and len(text) > 0: return [] # pattern completion... else: return []
def complete_load_config(self, text, line, begidx, endidx): argument = extractFullArgument(line, endidx) return getPossibleFilenameCompletions(argument)
def complete_function(self, text, line, begidx, endidx): key = extractFullArgument(line, endidx) return autoCompleteListWithSeparator(key, self.fetchSupportedKeys())
def completeAnalysisModule(self, text, line, begidx, endidx): key = extractFullArgument(line, endidx) return autoCompleteListWithSeparator(key, self.getAnalysisModules())
def pathCompleter(model, text, line, begidx, endidx): argument = extractFullArgument(line, endidx) return getPossibleFilenameCompletions(argument)