Anonymous avatar Anonymous committed 6d9a2d4

docs: updated new features section of README.txt

Comments (0)

Files changed (1)

 New Features
 ============
 
+* added "use function" refactoring
+* completing names after from-imports
+* adding resources parameter to some refactorings
+* added rope.contrib.autoimport module
+* handling unsure matches in restructurings
+* deprecated in_file argument of Rename.get_changes()
+
+
+``Use Function`` Refactoring
+----------------------------
+
+It tries to find the places in which a function can be used and
+changes the code to call it instead.  For instance if mod1 is::
+
+  def square(p):
+      return p ** 2
+
+  my_var = 3 ** 2
+
+
+and mod2 is::
+
+  another_var = 4 ** 2
+
+if we perform "use function" on square function, mod1 will be::
+
+  def square(p):
+      return p ** 2
+
+  my_var = square(3)
+
+and mod2 will be::
+
+  import mod1
+  another_var = mod1.square(4)
+
+(Example from the mailing list)
+
+
+Completing Names After From Imports
+-----------------------------------
+
+`rope.base.codeassist.code_assist` now completes the names
+after from-imports, too.  For instance completing::
+
+  from shutil import rm
+
+will propose ``rmtree``.
+
+
+Refactoring Resources Parameter
+-------------------------------
+
+I've added a new parameter to some refactorings, restructure and find
+occurrences called ``resources``.  If it is a list of `File`\s, all
+other resources in the project are ignored and the refactoring only
+analyzes them; if it is `None` all python module in the project will
+be analyzed.  Using this parameter, IDEs can let the user limit the
+files on which a refactoring should be applied.
+
+I've also deprecated the "in_file" parameter of rename refactoring;
+``resources`` can be used instead.
+
+
+Auto-Importing
+--------------
+
+`rope.contrib.autoimport` module has been added.  This module can be
+used to find the modules that provide a name.  IDEs can use this
+module to auto-import names.  `AutoImport.get_modules()` returns the
+list of modules with the given global name.
+`AutoImport.import_assist()` tries to find the modules that have a
+global name that starts with the given prefix.
+
 
 Getting Started
 ===============
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 ProjectModifiedEvent.java.
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.