I have the following workspace structure:
******************************************
MasterProject
python-sub-project1
module1.py
python-sub-project2
…
non-python-subproject 10
non-python-subproject 11
…
python-sub-project1 (one of those above but imported in workspace as independent project)
module1.py
python-sub-project2 (one of those above but imported in workspace as independent project)
******************************************
1. MasterProject for some reason gets Python nature, albeit there are other (non-Python) subprojects as well. I hope it is totally OK?
2. When I work in python-sub-project1 as imported in workspace as independent project and press F3, then Eclipse+PyDev opens files in MasterProject's context. For example, I am in module1.py of idependent python-sub-project1 and press F3 for a identifier that defined in the same file module1.py, PyDev opens for the same file a new editor window MasterProject/python-sub-project1/module1.py . Not quite what desired…
I tried to remove Pydev config and/or Python nature from the top project "MasterProject" to avoid these teleportations to top level context. However, it doesn't seem to be removable.
I tried working sets - it doesn't help. Only "Close" of MasterProject helps, but it means that I have to close it all the time when I have to descent to python-sub-project1 or open it again when return back to MasterProject
:-/
Any comments, ideas?
P.S. Many thanks for a great plugin, I can't even imagine a huge work behind it !
Kind regards
Valery
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is not that the master gets the python nature (whenever you open a file in a project it'll automatically get it, but that shouldn't be a problem).
The actual problem is the way that PyDev sees things… inside PyDev, it doesn't work with the Eclipse abstraction of IFile, and works with actual java.io.File, so, when it comes the time to show it to the user, it translates that path to a path in the
Eclipse abstraction to open the editor (sometimes that's possible and sometimes that's not - i.e.: things in the system interpreter and not really in an eclipse project, but it should work nonetheless). Anyway, the problem arises when more than one match is found in the workspace… I guess that PyDev could add a better heuristic to find the proper IFile covering your use case… (i.e.: when a duplicate is found, try to resolve it as an actual python module and if one resolves, use it, as in your case, although the master has the nature, it shouldn't be able to resolve it as a module because the pythonpath is not configured).
Hi
I have the following workspace structure:
******************************************
MasterProject
python-sub-project1
module1.py
python-sub-project2
…
non-python-subproject 10
non-python-subproject 11
…
python-sub-project1 (one of those above but imported in workspace as independent project)
module1.py
python-sub-project2 (one of those above but imported in workspace as independent project)
******************************************
1. MasterProject for some reason gets Python nature, albeit there are other (non-Python) subprojects as well. I hope it is totally OK?
2. When I work in python-sub-project1 as imported in workspace as independent project and press F3, then Eclipse+PyDev opens files in MasterProject's context. For example, I am in module1.py of idependent python-sub-project1 and press F3 for a identifier that defined in the same file module1.py, PyDev opens for the same file a new editor window MasterProject/python-sub-project1/module1.py . Not quite what desired…
I tried to remove Pydev config and/or Python nature from the top project "MasterProject" to avoid these teleportations to top level context. However, it doesn't seem to be removable.
I tried working sets - it doesn't help. Only "Close" of MasterProject helps, but it means that I have to close it all the time when I have to descent to python-sub-project1 or open it again when return back to MasterProject
:-/
Any comments, ideas?
P.S. Many thanks for a great plugin, I can't even imagine a huge work behind it !
Kind regards
Valery
The problem is not that the master gets the python nature (whenever you open a file in a project it'll automatically get it, but that shouldn't be a problem).
The actual problem is the way that PyDev sees things… inside PyDev, it doesn't work with the Eclipse abstraction of IFile, and works with actual java.io.File, so, when it comes the time to show it to the user, it translates that path to a path in the
Eclipse abstraction to open the editor (sometimes that's possible and sometimes that's not - i.e.: things in the system interpreter and not really in an eclipse project, but it should work nonetheless). Anyway, the problem arises when more than one match is found in the workspace… I guess that PyDev could add a better heuristic to find the proper IFile covering your use case… (i.e.: when a duplicate is found, try to resolve it as an actual python module and if one resolves, use it, as in your case, although the master has the nature, it shouldn't be able to resolve it as a module because the pythonpath is not configured).
Please create a bug report for that (you can just point to this thread in the bug report). See: http://pydev.org/faq.html#how_do_i_report_a_bug
Cheers,
Fabio
Thanks, Fabio, done.