Anonymous avatar Anonymous committed cd748f9

Added docs for rope.contrib.codeassist to library.txt

Comments (0)

Files changed (7)

 Overview
 ========
 
-`rope`_ is a python refactoring library and IDE.  The IDE uses the
+`Rope`_ is a python refactoring library and IDE.  The IDE uses the
 library to provide features like refactoring, code assist, and
 auto-completion.  It is written in python.  The IDE uses `Tkinter`
 library.
 
-Rope IDE and library are released in two separate packages.  *rope*
-package contains only the library and *ropeide* package contains the
-IDE and the library.
+Ropeide and library are released in two separate packages.  You should
+install rope before using the library.
 
 .. _`rope`: http://rope.sf.net/
 
 New Features
 ============
 
+* *Ropemacs* package for using rope in emacs
+* Added `Core.add_extension()` for registering extension modules for
+  *ropeide*
+* A new open project dialog
+
+
+Backward Incompatible Changes
+-----------------------------
+
+* *Ropeide* and *ropemacs* packages depend on *rope* package; *rope*
+  should be installed, first.
+* Renamed ``rope.py`` and ``rope`` scripts to ``ropeide.py`` and
+  ``ropeide``.
+* *Ropeide* reads ``~/.ropeide`` instead of ``~/.rope``
+* `rope.ide.codeassist` was moved to `rope.contrib.codeassist`
 
 
 Getting Started

docs/contributing.txt

   rope
     base
     refactor
-    ide
-    ui
+    contrib
 
 Have a look at ``__init__.py`` of packages for finding their
 description.  Also have a look at `library.txt`_ for a few

docs/dev/issues.txt

 possible.
 
 
-
-Separating Ropeide
-==================
-
-* New package structure::
-
-    rope/
-      base
-      refactor
-    ropeide/
-      ide
-      ui
-
-* ``rope.py`` -> ``ropeide.py``
-* ``rope`` -> ``ropeide``
-* ``~/.rope`` -> ``~/.ropeide.py``
-
-Problems:
-
-* Changing rope requires changing ropeide
-* Ropeide needs to work with multiple versions of rope?
-* Ropeide uses lots of internal things from rope
-
-
 Better Concluded Data
 =====================
 

docs/dev/workingon.txt

 - Three separate packages: rope, ropeide, ropemacs
 - Separating ropeide tests
 - Renaming ``~/.rope`` to ``~/.ropeide``
+- Documenting backward incompatible changes
 
-* Documenting backward incompatible changes
+* Separating docs for different packages; different ``README.txt``\s?
 * Updating docs
-* Separating docs for different packages
+* Adding docs for using code assist to ``library.txt``
+
+===========================  =============================
+Filename                     Belongs to
+===========================  =============================
+docs/contributing.txt        all
+docs/done.txt                all
+docs/library.txt             rope, ropeide
+docs/ropemacs.txt            ropemacs
+docs/index.txt               all
+docs/overview.txt            rope, ropeide
+docs/tutorial.txt            ropeide
+===========================  =============================
 
 
 ropemacs Mode
   my_fscommands = MyFileSystemCommands()
   project = rope.base.project.Project('~/myproject',
                                       fscommands=my_fscommands)
+
+
+`rope.contrib.codeassist`
+=========================
+
+The `rope.contrib` package contains modules that use rope base parts
+and provide useful features.  `rope.contrib.codeassist` module can
+be used in IDEs::
+
+  from rope.ide import codeassist
+
+
+  # Get the proposals; you might want to pass a Resource
+  proposals = codeassist.code_assist(project, source_code, offset)
+  # Sorting proposals; for changing the order see pydoc
+  proposals = codeassist.sorted_proposals(proposals)
+
+  # Where to insert the completions
+  starting_offset = codeassist.starting_offset(source_code, offset)
+
+  # Applying a proposal
+  proposal = proposals[x]
+  if isinstance(proposal, codeassist.CompletionProposal):
+      replacement = proposal.name
+  else:
+      # isinstance(proposal, codeassist.TemplateProposal) == True
+      # mapping is a proposal.template.variables() -> str dict
+      replacement = proposal.template.substitute(mapping)
+
+  new_source_code = (source_code[:starting_offset] +
+                     replacement + source_code[offset:])
+
+
+See pydocs and source code for more information (other functions in
+that module might be interesting, too; like `get_doc`,
+`get_definition_location` and `find_occurrences`).
 """rope, a python refactoring library"""
 
 INFO = __doc__
-VERSION = '0.6.3'
+VERSION = '0.7'
 COPYRIGHT = """\
 Copyright (C) 2006-2007 Ali Gholami Rudi
 
 
 
 if __name__ == '__main__':
-    ropeide.core.Core.get_core().run()
+    ropeide.core.get_core().run()
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.