I hope someone can help me with two issues I'm experiencing with the pydev for eclipse. I only use pydev for coding in jython, so both are specific to jython:
1. If I import jars that are not part of java base package then the code completion does not work. I have tried to add them into PYTHONPATH of the project and also in the pydev system config.
2. For some reason the latest pydev is not storing the full path to the jars when I add to PYTHONPATH. If I added c:\a\b\c\d.jar, then all I see is "d.jar". And then jython is unable to find the jar when I run it. Manually editing .pydevproject with the full path makes it work again.
Thanks in advance for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The jython code completion is working significantly better than before, thanks.
However, I still have an issue that I'm not sure how to diagnose.
Code completion for jars that I create doesn't seem to work. Here's what I did:
- created a java project, set the pydev nature, set the python path to both the src folder and the default class folder - bin.
- created a java class PyDevCCTest in package com.xyz.cctest and a test jython script pydevCodeCompletion.py
- tried to add an import statement: from com.xy<ctrl+space> and nothing turns up.
- manually typed the import statement correctly
- tried running the jython script and it works fine and is able to access the java class and call the methods etc.
-- thought maybe I could get around the code completion by creating a jar file
- exported a jar for the java class
- added it into pythonpath as a library, (and removed the bin folder from source folders)
- ** code completion now works for the import statement!
- tried to use code completion to get a method, and it fails.
Here what I don't understand is the reason why it works for other jars. I've successfully code completed oracle jdbc, jdom etc. What's different about the jar that I created?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I hope someone can help me with two issues I'm experiencing with the pydev for eclipse. I only use pydev for coding in jython, so both are specific to jython:
1. If I import jars that are not part of java base package then the code completion does not work. I have tried to add them into PYTHONPATH of the project and also in the pydev system config.
2. For some reason the latest pydev is not storing the full path to the jars when I add to PYTHONPATH. If I added c:\a\b\c\d.jar, then all I see is "d.jar". And then jython is unable to find the jar when I run it. Manually editing .pydevproject with the full path makes it work again.
Thanks in advance for your help.
This is a bug. It's already fixed in the svn (and in the nightly build) and should be available for the next version (which should be released soon).
Cheers,
Fabio
Fabio,
The jython code completion is working significantly better than before, thanks.
However, I still have an issue that I'm not sure how to diagnose.
Code completion for jars that I create doesn't seem to work. Here's what I did:
- created a java project, set the pydev nature, set the python path to both the src folder and the default class folder - bin.
- created a java class PyDevCCTest in package com.xyz.cctest and a test jython script pydevCodeCompletion.py
- tried to add an import statement: from com.xy<ctrl+space> and nothing turns up.
- manually typed the import statement correctly
- tried running the jython script and it works fine and is able to access the java class and call the methods etc.
-- thought maybe I could get around the code completion by creating a jar file
- exported a jar for the java class
- added it into pythonpath as a library, (and removed the bin folder from source folders)
- ** code completion now works for the import statement!
- tried to use code completion to get a method, and it fails.
Here what I don't understand is the reason why it works for other jars. I've successfully code completed oracle jdbc, jdom etc. What's different about the jar that I created?
oh and I'm using the latest pydev 1.4.6.2788 in Eclipse 3.4.2 ganymede
Thanks!