简体   繁体   中英

Java class methods do not auto complete in Jython using Eclipse Pydev

I'm using PyDev 2.5 with Eclipse Indigo and Jython 2.5.3b1 . I have a JAR file that contains certain classes which I'm importing to a PyDev (Jython ) project. They seem to work seamlessly except for Auto completion. The member functions of Java Classes do not auto-complete eg pressing the dot '.' operator does not bring up the list for class member functions. The jar file is added to the PyDev-PYTHONPATH external libraries of the PyDev project.

Screenshot of PYTHONPATH external libs

Auto completion does not work for the code below, but it compiles and runs perfectly fine.

from my.testpackage import MyClass

myVar = MyClass("Monkey")

print myVar.getName()

Typing "myVar." does not auto complete

Worth noting that auto completion works if I imported a non custom jar

eg

from java.lang import Math

print Math.max(3,5)

Typing "Math." will auto complete

I'm not sure if this functionality even supported in the current version of PyDev. Does anyone actually have this working in their PyDev and Eclipse setup?

Any suggestion would be appreciated.

Thank you,

DM

It may be some issue in your PYTHONPATH configuration. Have you read: http://pydev.org/manual_101_project_conf2.html (most specifically the end of the page: "Project reference for Jython users").

If that doesn't help you, can you explain how are you referencing things? (a screenshot with the config would be nice)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM