Example #1
0
def _reparse_file(source, line, column, path):
    """Handles the reparse using the appropriate code parser for SSH or
    the local file system."""
    import fortpy.isense.cache as cache
    parser = cache.parser()
    if parser.tramp.is_ssh(path):
        cache.parser("ssh").reparse(path)
    else:
        parser.reparse(path)

    return "{}... Done".format(path)
Example #2
0
def _reparse_file(source, line, column, path):
    """Handles the reparse using the appropriate code parser for SSH or
    the local file system."""
    import fortpy.isense.cache as cache

    parser = cache.parser()
    if parser.tramp.is_ssh(path):
        cache.parser("ssh").reparse(path)
    else:
        parser.reparse(path)

    return "{}... Done".format(path)
Example #3
0
                single.append("'{0}' not found in {1}".format(edit[4], 
                                                            list(edit[3].keys())))
            script = get_script(edit)
            result = script.in_function_call()
            if edit[3] is not None:
                single.append(getattr(edit[3][edit[4]], edit[5]))
            single.append(result)

        except:
            print(single)
            raise
        results.append("\n".join([str(i) for i in single]))

    return results

import fortpy.isense.cache as cache
cache.parser().reparse(get_path(source[0]))
module = cache.parser().modules["monte_orderparam"]
edits = [["tests/isense/edits/signature.f90", 208, 30, 
          module.executables, "single_corr", "paramorder"], 
         ["tests/isense/edits/docstring.f90", 208, 30, None],
         ["tests/isense/edits/variable.f90", 206, 9, 
          module.executables, "flip_after", "members"], 
         ["tests/isense/edits/new_element.f90", 142, 4, 
          module.executables, "new_method", "paramorder" ]]

settings.real_time_update = True
with open(get_path("tests/isense/rtupdate.tmp"), 'w') as f:
    f.write('\n\n')
    f.write("\n\n".join([str(i) for i in test_real_time()]))