Menu ▾ ▴

pythonpath_contrib extension point

2009-02-19
2013-03-15
  • ddoubledaysf

    ddoubledaysf - 2009-02-19

    In my plugin I am contributing to the PythonPath. I noticed the documentation says that if the contribution changes, then the user has to go in to the dialog and press the “Force internal restore” button. I thought I could maybe do better than that programmatically, so when my contribution changes I get all the PythonNatures in the workspace and call PythonNature.rebuildPath() on them. This seems to work well, with one exception—the auto-completion cache.

    So, for example, say that I am initially contributing nothing. In the editor, auto-completion suggests nothing from my code. Now, I make a change to start contributing a directory, and when I do that I rebuild paths as described above. Now my contributions are suggested by auto-completion. Now, suppose I remove my contribution and rebuild paths again, my contributions are still suggested. I believe it is because of the completion cache, because if I close the project and re-open, my contributions are no longer suggested again.

    Is it safe for me to just clear that the completion cache directly, or should PythonNature.rebuildPath() be changed to clear it, or am I wrong altogether?

     
    • ddoubledaysf

      ddoubledaysf - 2009-02-19

      One more comment on this--it seems to me that the "Force internal restore" would have the same issue because all it does is rebuildPath()

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2009-02-19

        You're right. The cache is not being properly cleared when a source folder is removed. That's a bug (please report it as such).

        Cheres,

        Fabio

         
        • ddoubledaysf

          ddoubledaysf - 2009-02-19

          Added here:

          https://sourceforge.net/tracker2/?func=detail&aid=2617548&group_id=85796&atid=577329

          I put a little more information in the bug report. I actually wouldn't mind working on this, but I would need a little guidance where to look--PythonCodeCompletion.java looks kinda hairy.

           
        • ddoubledaysf

          ddoubledaysf - 2009-02-19

          Added here:

          https://sourceforge.net/tracker2/?func=detail&aid=2617548&group_id=85796&atid=577329

          I put a little more information in the bug report. I actually wouldn't mind working on this, but I would need a little guidance where to look--PythonCodeCompletion.java looks kinda hairy.