jython javadocs not showing in code completio

2008-10-02
2013-03-15
  • using eclipse 3.3

    I installed pydev and configured it for jython.  Code completion doesn't show me the jython javadocs though.

    i.e. if you were to look at this pic:

    http://pydev.sourceforge.net/images/codecompletion/compl3.png

    I can see the green box but not the yellow box to it's right with the text.

    How do I import the javadocs?

     
    • Fabio Zadrozny
      Fabio Zadrozny
      2008-10-03

      Actually, pydev gets most of it by reflection using a shell... but in the case of Jython:
      import StringIO
      print StringIO.StringIO.__doc__
      None

      while in Python:
      import StringIO
      print StringIO.StringIO.__doc__
      class StringIO([buffer])

          When a StringIO object is created, it can be initialized to an existing
          string by passing the string to the constructor. If no string is given,
          the StringIO will start empty.

          The StringIO object can accept either Unicode or 8-bit strings, but
          mixing the two may take some care. If both are used, 8-bit strings that
          cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause
          a UnicodeError to be raised when getvalue() is called.
         

      So, it's not really a Pydev issue, but a Jython issue at this level...

      Cheers,

      Fabio

       
    • I installed python 2.6 and the javadocs are working properly for that perspective- still working on jython docs.

      Now I have a jython project and a python project.

      For code completion, why are the icons for jython functions showing as a red square(builtin), but for python 2.6 the icon is a green circle(local/imported?)?

      I created the similar projects for both interpreters, and used the same line of code.

      dict = {"key1":"val1"}

      In python, the code completion for dict.keys completes to dict.keys().

      In jython it completes to dict.keys, no brackets.

       
      • Fabio Zadrozny
        Fabio Zadrozny
        2008-10-13

        That's because the introspection for jython is not as good as the instrospection in python... Also, when completing java classes, it tries to use the icons that JDT gives and be consistent with what you have in java.

        Cheers,

        Fabio