ActiveState Community

Have "Go to File" only list files in active project

Posted by nathan on 2009-04-27 06:34
OS: All / Any

Subject pretty much says it all; is there any way I can configure "Go to File" to only show files from the currently active project? (Also excluding any history).

And while I'm at the subject, is there a way for me to clear the history for the "Go to File" feature?

trentm | Mon, 2009-04-27 10:28

There is not currently a way to do this, but fair enough. I've added a bug for this:

http://bugs.activestate.com/show_bug.cgi?id=82927

Are you asking mainly because you feel the history elements (from your history) are getting in the way? Or are the other gatherers (currently open files, files in same directory as the currently open files) also getting in your way?

I ask, because that might affect the way I try to implement the preferences for this.

BTW, if you want to *hack* this for your Komodo installation, then you can tweak the "gatherersAndCwds" method in "koFastOpen.py" in your Komodo installation. You'll want to comment out the appending of "KomodoOpenViewsGatherer" and "KomodoHistoryURIsGatherer" and "DirGatherer's" to the "g" variable.

Thanks!

nathan | Mon, 2009-04-27 11:24

My primary reason for wanting this is because I find it a bit annoying when files show up twice (once for the project and once from the history).

Also I have "wrong" paths showing up in history due to a bug > http://bugs.activestate.com/show_bug.cgi?id=82885

Really if I could just purge or disable the history feature for now I'd be quite happy :) I'll try the "hack" you suggested.

Edit:

Another reason is simply because I have no interest in files from other projects while I am working in my active project (I personally only work on one project at a time :p).

nathan | Mon, 2009-04-27 11:28

The hack worked perfectly :) Thanks Trent.

trentm | Mon, 2009-04-27 11:32

Note that with that hack in place, Komodo's auto-update might hiccup: a "partial" update won't know how to do its thing, so it'll fallback to a complete update (bigger download, slower update).

nathan | Mon, 2009-04-27 11:51

Thanks, I'll be sure to restore the original version when updating.

trentm | Mon, 2009-04-27 11:36

> My primary reason for wanting this is because I find it a bit annoying
> when files show up twice (once for the project and once from the
> history).

Hrm, the fastopen dialog *is* making some attempts to filter out duplicate paths. I'll look into why that doesn't catch these ones.

awmcclain | Thu, 2009-10-15 21:13

We work in a DVCS, so every time we switch branches the old files would show up in the history -- which led to a LOT of errors if you weren't careful.

The hack worked perfectly. Thank you.

And yes, for us, the fastopen dialog would sometimes get confused about which file to include from the current path and which to include from the project -- since in our case, we almost always launch the project FROM the project directory.

gatavas | Tue, 2009-11-03 09:15

trentm | Mon, 2009-04-27 10:28 :

"I ask, because that might affect the way I try to implement the preferences for this."

when there will be options for "go to file" in preferences? waiting for this 7 months already :/ ..

toddw | Thu, 2009-11-05 14:12

It is targeted to be fixed for the next Komodo release.