简体   繁体   English

Java类方法不能使用Eclipse Pydev在Jython中自动完成

[英]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 . 我正在使用PyDev 2.5与Eclipse Indigo和Jython 2.5.3b1。 I have a JAR file that contains certain classes which I'm importing to a PyDev (Jython ) project. 我有一个JAR文件,其中包含我正在导入PyDev(Jython)项目的某些类。 They seem to work seamlessly except for Auto completion. 它们似乎无缝地工作,除了自动完成。 The member functions of Java Classes do not auto-complete eg pressing the dot '.' Java类的成员函数不会自动完成,例如按“点”。 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. jar文件被添加到PyDev项目的PyDev-PYTHONPATH外部库中。

Screenshot of PYTHONPATH external libs PYTHONPATH外部库的屏幕截图

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." 输入“myVar”。 does not auto complete 不会自动完成

Worth noting that auto completion works if I imported a non custom jar 值得注意的是,如果我导入了非自定义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. 我不确定在当前版本的PyDev中是否支持此功能。 Does anyone actually have this working in their PyDev and Eclipse setup? 有没有人真正在PyDev和Eclipse设置中工作?

Any suggestion would be appreciated. 任何建议将不胜感激。

Thank you, 谢谢,

DM DM

It may be some issue in your PYTHONPATH configuration. 这可能是您的PYTHONPATH配置中的一些问题。 Have you read: http://pydev.org/manual_101_project_conf2.html (most specifically the end of the page: "Project reference for Jython users"). 您是否阅读过: http//pydev.org/manual_101_project_conf2.html (最具体的是页面末尾:“Jython用户的项目参考”)。

If that doesn't help you, can you explain how are you referencing things? 如果这对你没有帮助,你能解释一下你是如何引用的吗? (a screenshot with the config would be nice) (使用配置的屏幕截图会很好)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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