예제 #1
0
    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 []
예제 #2
0
    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 []
예제 #3
0
파일: ertshell.py 프로젝트: Ensembles/ert
 def complete_load_config(self, text, line, begidx, endidx):
     argument = extractFullArgument(line, endidx)
     return getPossibleFilenameCompletions(argument)
예제 #4
0
 def complete_load_config(self, text, line, begidx, endidx):
     argument = extractFullArgument(line, endidx)
     return getPossibleFilenameCompletions(argument)
예제 #5
0
파일: shell_plot.py 프로젝트: bramirex/ert
 def complete_function(self, text, line, begidx, endidx):
     key = extractFullArgument(line, endidx)
     return autoCompleteListWithSeparator(key,
                                          self.fetchSupportedKeys())
예제 #6
0
 def completeAnalysisModule(self, text, line, begidx, endidx):
     key = extractFullArgument(line, endidx)
     return autoCompleteListWithSeparator(key, self.getAnalysisModules())
예제 #7
0
def pathCompleter(model, text, line, begidx, endidx):
    argument = extractFullArgument(line, endidx)
    return getPossibleFilenameCompletions(argument)
예제 #8
0
파일: shell_plot.py 프로젝트: Ensembles/ert
 def complete_function(self, text, line, begidx, endidx):
     key = extractFullArgument(line, endidx)
     return autoCompleteListWithSeparator(key, self.fetchSupportedKeys())
예제 #9
0
def pathCompleter(model, text, line, begidx, endidx):
    argument = extractFullArgument(line, endidx)
    return getPossibleFilenameCompletions(argument)