Exemple #1
0
    def call_eclim(self, project, filename, offset, ident_len, shell=True):
        eclim.update_java_src(project, filename)

        go_to_cmd = [
            '-command', 'java_search', '-n', project, '-f', filename, '-o',
            str(offset), '-e', 'utf-8', '-l',
            str(ident_len), '-x', 'references'
        ]
        out = eclim.call_eclim(go_to_cmd)
        return out
 def call_eclim_scala(self, project, file, offset, shell=True):
     eclim.update_scala_src(project, file)
     complete_cmd = "-command scala_complete \
                             -p %s \
                             -f %s \
                             -o %i \
                             -e utf-8 \
                             -l compact" % (project, file, offset)
     out = eclim.call_eclim(complete_cmd)
     return out
Exemple #3
0
 def call_eclim_scala(self, project, file, offset, shell=True):
     eclim.update_scala_src(project, file)
     complete_cmd = "-command scala_complete \
                             -p %s \
                             -f %s \
                             -o %i \
                             -e utf-8 \
                             -l compact" % (project, file, offset)
     out = eclim.call_eclim(complete_cmd)
     return out
def call_eclim(project, file, length, offset, new_name):
    eclim.update_java_src(project, file)
    rename_cmd = "$ECLIM -command java_refactor_rename \
                -p %s \
                -f %s \
                -o %i \
                -e utf-8 \
                -l %i \
                -n %s" % (project, file, offset, length, new_name)
    out = eclim.call_eclim(rename_cmd)
    return out
def call_eclim(project, file, offset, shell=True):
    eclim.update_java_src(project, file)

    complete_cmd = "$ECLIM -command java_complete \
                            -p %s \
                            -f %s \
                            -o %i \
                            -e utf-8 \
                            -l compact" % (project, file, offset)
    out = eclim.call_eclim(complete_cmd)
    return out
def call_eclim(project, file, offset, ident_len, shell=True):
    eclim.update_java_src(project, file)

    go_to_cmd = "$ECLIM -command java_search \
                            -n %s \
                            -f %s \
                            -o %i \
                            -e utf-8 \
                            -l %i" % (project, file, offset, ident_len)
    out = eclim.call_eclim(go_to_cmd)
    return out
Exemple #7
0
 def call_eclim(self, project, _file, identifier):
     eclim.update_java_src(project, _file)
     complete_cmd = "-command java_import \
                             -n %s \
                             -p %s" % (project, identifier)
     class_name = eclim.call_eclim(complete_cmd)
     class_name = json.loads(class_name)
     if class_name:
         return class_name
     else:
         return []
    def call_eclim(self, project, filename, offset, ident_len, shell=True):
        eclim.update_java_src(project, filename)

        go_to_cmd = ['-command', 'java_search',
                        '-n', project,
                        '-f', filename,
                        '-o', str(offset),
                        '-e', 'utf-8',
                        '-l', str(ident_len)]
        out = eclim.call_eclim(go_to_cmd)
        return out
Exemple #9
0
 def call_eclim(self, project, _file, identifier):
     eclim.update_java_src(project, _file)
     complete_cmd = "-command java_import \
                             -n %s \
                             -p %s" % (project, identifier)
     class_name = eclim.call_eclim(complete_cmd)
     class_name = json.loads(class_name)
     if class_name:
         return class_name
     else:
         return []
 def run(self):
     if not check_eclim(self.window.active_view()):
         return
     self.projects = {}
     self.project_paths = []
     cmd = "-command projects"
     out = eclim.call_eclim(cmd)
     ps = json.loads(out.strip())
     for p in ps:
         self.projects[p['name']] = p
         self.project_paths.append([p['name'], p['path']])
     self.window.show_quick_panel(self.project_paths, self.on_done)
Exemple #11
0
 def run(self):
     if not check_eclim(self.window.active_view()):
         return
     self.projects = {}
     self.project_paths = []
     cmd = "-command projects"
     out = eclim.call_eclim(cmd)
     ps = json.loads(out.strip())
     for p in ps:
         self.projects[p['name']] = p
         self.project_paths.append([p['name'], p['path']])
     self.window.show_quick_panel(self.project_paths, self.on_done)
 def call_eclim(self, project, _file, offset):
     eclim.update_java_src(project, _file)
     complete_cmd = "-command java_import \
                             -p %s \
                             -f %s \
                             -o %i \
                             -e utf-8" % (project, _file, offset)
     result = eclim.call_eclim(complete_cmd)
     try:
         result = json.loads(result)
     except ValueError:
         pass
     return result
def call_eclim(project, file, line, offset, applied_correction=None):
    eclim.update_java_src(project, file)

    correct_cmd = (
        "$ECLIM -command java_correct \
                -p %s \
                -f %s \
                -l %i \
                -o %i \
                -e utf-8 "
        % (project, file, line, offset)
    )
    if applied_correction != None:
        correct_cmd += " -a %i" % (applied_correction)

    out = eclim.call_eclim(correct_cmd)
    return out
Exemple #14
0
    def call_eclim(self,
                   project,
                   filename,
                   offset,
                   ident_len,
                   fullWord,
                   shell=True):
        eclim.update_java_src(project, filename)

        # go_to_cmd = ['-command', 'java_search',
        #                 '-n', project,
        #                 '-f', filename,
        #                 '-o', str(offset),
        #                 '-e', 'utf-8',
        #                 '-l', str(ident_len)]

        go_to_cmd = ['-command', 'java_search', '-p', fullWord]

        out = eclim.call_eclim(go_to_cmd)
        return out
Exemple #15
0
 def run_eclim(self, cmdline):
     log.info(cmdline)
     flat = flatten_command_line(cmdline)
     return eclim.call_eclim(flat)
 def call_eclim(self, project, file_name, class_name):
     eclim.update_java_src(project, file_name)
     go_to_cmd = ['-command', 'java', '-p', project, '-c', class_name]
     out = eclim.call_eclim(go_to_cmd)
     return out
 def run_eclim(self, cmdline):
     log.info(cmdline)
     flat = flatten_command_line(cmdline)
     return eclim.call_eclim(flat)
 def call_eclim(self, project, file_name, class_name, args=""):
     eclim.update_java_src(project, file_name)
     go_to_cmd = ['-command', 'java', '-p', project, '-c', class_name, '-a'] + args.split(" ")
     out = eclim.call_eclim(go_to_cmd)
     return out
Exemple #19
0
 def call_eclim(self, project, file_name, class_name):
     eclim.update_java_src(project, file_name)
     go_to_cmd = ['-command', 'java', '-p', project, '-c', class_name]
     out = eclim.call_eclim(go_to_cmd)
     return out