Commits

Ali Gholami Rudi  committed 2845e11

0.2pre2

  • Participants
  • Parent commits 0306965

Comments (0)

Files changed (7)

 Version Overview
 ----------------
 Features added in this release:
-  *
+
+* Auto-complete local variable names
+* Proposing templates in code-assist proposals
+* Auto-complete from-import imported objects
+* Not proposing variables which are not defined yet
+* Proposing function parameters in functions
+* Auto-completion ignores current statement errors
+* Next/prev word stops at underlines and capitals
+* Ignoring string and comment contents while indenting
+
+Rope is moving on. By 0.2 release, rope's auto-completion will be
+almost perfect.
 
 
 Keybinding

File docs/stories.txt

 * Auto completion contexts; strings, comments, functions and ... @ 2
 
 
-* Auto completion after "."s @ 3
+* Auto completion after "."s @ 2
+
+
+* Auto-completing "self."s @ 3
 
 
 > Public release 0.2pre2 : June 4, 2006
 
 
-* Auto-completing "self."s @ 2
-
-
 --- Remaining Stories ---
 ? Change program goals and description; principles.html
   ? Go toward refactoring and ... library rather than an IDE

File docs/workingon.txt

 - Accessing PyObject type
 - Builtin types: Module, Function, Type
 - Add Unknown type
+- Classes inside classes
 
+? What if the element does not exist
+* Better attributes names in pycore classes
 ? PyObject.info
     * Function types should have args, defaults, keywords attributes
-* Better attributes names in pycore classes
-* Classes inside classes
+? PyObject equality check; Value objects
+? Getting children only when necessary, invalidating
 ? Classes and functions defined in functions
-? What if the element does not exist
-? Getting children only when necessary, invalidating
-? PyObject equality check; Value objects
 
 ? Don't look for local variable completions
 ? Add PythonHierarchy.create_element(Resource)

File rope/codeassist.py

                              "    def test_${aspect1}(self):\n        pass${cursor}\n\n\n" + \
                              "if __name__ == '__main__':\n    unittest.main()\n"
         result.append(TemplateProposal('test_case', Template(test_case_template)))
+        result.append(TemplateProposal('hash', Template('\n    def __hash__(self):\n' + \
+                                                        '        return 1${cursor}\n')))
+        result.append(TemplateProposal('eq', Template('\n    def __eq__(self, obj):\n' + \
+                                                        '        ${cursor}return obj is self\n')))
         return result
 
     def _find_starting_offset(self, source_code, offset):

File rope/pycore.py

             attributes.update(visitor.result)
             return PyObject(PyType.get_type('Module'), attributes)
 
+    def create_module(self, contents):
+        attributes = {}
+        ast = compiler.parse(contents)
+        visitor = _GlobalVisitor()
+        compiler.walk(ast, visitor)
+        attributes.update(visitor.result)
+        return PyObject(PyType.get_type('Module'), attributes)
+
+
 
 class PyObject(object):
 
     def visitAssName(self, node):
         self.children[node.name] = PyObject(PyType.get_type('Unknown'))
 
+    def visitClass(self, node):
+        self.children[node.name] = _ClassVisitor.make_class(node)
+
     @staticmethod
     def make_class(node):
         new_visitor = _ClassVisitor()

File ropetest/codeassisttest.py

         result = self.assist.assist(code, len(code))
         self.assert_completion_in_result('nestedmod', 'unknown', result)
 
+    # TODO: Auto completing after 'self.'
+    def xxx_test_completing_after_self_dot(self):
+        code = 'class Sample(object):\n    def method1(self):\n        pass\n    def method2(self):\n' + \
+               '        self.m'
+        result = self.assist.assist(code, len(code))
+        self.assert_completion_in_result('self.method1', 'method', result)
+
 
 class TemplateTest(unittest.TestCase):
 

File ropetest/pycoretest.py

         sample_class = mod_element.attributes['SampleClass']
         var = sample_class.attributes['var']
         
+    def test_classes_inside_other_classes_set_in_init(self):
+        mod = self.project.create_module(self.project.get_root_folder(), 'mod')
+        mod.write('class SampleClass(object):\n    class InnerClass(object):\n        pass\n\n')
+        mod_element = self.pycore.get_module('mod')
+        sample_class = mod_element.attributes['SampleClass']
+        var = sample_class.attributes['InnerClass']
+        self.assertEquals(PyType.get_type('Type'), var.type)
 
 
 if __name__ == '__main__':