Anonymous avatar Anonymous committed b42acd9 Draft

ropemacs: added rope-inline

Comments (0)

Files changed (1)


 import rope.refactor.rename
 import rope.refactor.extract
+import rope.refactor.inline
 from rope.base import project, libutils
 from rope.ide import codeassist
     def extract_method(self, newname):
         self._do_extract(rope.refactor.extract.ExtractMethod, newname)
+    @interactive('')
+    def inline(self):
+        self._check_project()
+        lisp.save_some_buffers()
+        resource, offset = self._get_location()
+        inliner = rope.refactor.inline.create_inline(
+            self.project, resource, offset)
+        self._perform(inliner.get_changes())
     def _perform(self, changes):
 rename = interface.rename
 extract_variable = interface.extract_variable
 extract_method = interface.extract_method
+inline = interface.inline
 goto_definition = interface.goto_definition
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.