Search code examples
pythoneclipsepydev

Eclipse: Open ressource on folder


Is it possible in Eclipse (pydev) to include folder (names) in the Open Ressource file navigation?


When opening specific files in one of my projects I often use the Open Ressource (see the Eclipse help) dialog (Navigate -> Open Ressource). This way I don't have to remember (or keep track in a multi-developer project), where a specific file is placed, but only the file name.

This only seems to filter through file names. I would rather like to

  • (optionally) include the folder name
  • open python package file __init__.py in the editor
    (or any other configurable custom file like __custom_module__.py)

How can I achieve this?


Solution

  • For finding any file, Ctrl+Shift+R (open resource) is good, but to find a Python package/module/class/method, Ctrl+Shift+T (Python tokens browser) is better -- you can filter by the module name as you want -- see the docs on the dialog when you open the tokens browser.

    Note: you need to focus some PyDev editor for it to become active (such as the PyDev package explorer or a PyDev editor).

    Note 2: You may still use a filter with folders in the open resource if you filter with the path (i.e.: *package/file*.py)