How do I access the places items in komodo 9.3?

I’m using Komodo 9.3.2, i’m trying to make an extension that will hide elements (files or folders) in the places pane.

I’m trying to access elements with javascript in placesViewbox but I can’t find how I can access the file list.

document.getElementById('places-files-tree-body') doesn’t seem to have it.

The closest I can get is with ko.places.viewMgr.view.getURIForRow(i) but what I want is either a row object or some styling setters.

How do I access the file list and tree element items ?


Hi, our developers that can help are on holiday at the moment. They should be able to help in a couple of weeks. Thanks for your patience.

Thanks, hope you’ll have some holidays too !

Unfortunately the file list resides in a XUL tree, which isn’t “really” part of the DOM, so your knowledge of the DOM is mostly irrelevant when dealing with them. To be frank, XUL trees are a giant pain in the ass.

You can read up on them here:

What is it you are trying to do exactly?

Yes I’ve checked the mozilla docs, xul trees are pure madness !!

I have a big project with a big file tree and I want to filter (hide) files and folders with a simple text box.

I usually have to work between two or three folders and filtering would help a lot !

Hi @cake,
Komodo already provides this.

Click the Gear menu > Manage Views. Unfortunately Komodo’s Includes and Excludes tooling doesn’t support full paths but you should still be able to accomplished what you need with what we provide.

Note that you can either set the managed view to Current Project or make a custom one for some generic project type you might work with.

  • Carey

Yes I’ve seen that, but I need a quick way to filter files and folders as I switch between files (or folders). It’s way too slow to click on the gear.

I wanted to do this : including matching folders.

@cake, sounds like you should be using Commando (Ctrl +Shift + O) > Files scope then.

Commando is too slow in my workflow.
Sometimes I don’t know the name of the next file or the folder that I’ll have to open (I’ll open two or three files and check), so I need a quick visual representation of the file tree (is it in this folder ? one folder up ?).
Or I’ll have to switch quickly between two folders and typing the name and navigating each time is time consuming.

Commando shouldn’t be any slower than the manual task of exploring the folders. I wonder if you are using it right? You can type partial names, including parent folders. In whatever order you want.

Let’s say you have the following file:


All of the following queries will show you the file:

  • file txt
  • file path
  • path my
  • file my to path

This isn’t necessary. Search from the top level (root) folder of your project. I can find a file in the Komodo source in less than a second using the technique @nathanr mentions (substrings of path and/or filename). Komodo source has over 10000 files in it.

  • Carey

Commando is technically fast, and I like the fuzzy search. But in my workflow it is not well suited.

Just now I had this scenario where I tried to use commando :
I know my file is in the “social” folder, I type “social” in commando but I realize that I don’t know which is the template file that has the string “card” in it. I revert to use the file tree, I scroll to the social folder, right click on it to launch the “Find” command.

That’s one example where the file tree is more useful, I can’t right click in commando to find or delete files…

Anyway what I initially wanted to know is if there is an api (or dom access) to this file tree ?

I believe that was answered so we’re trying to help you find a different solution :slight_smile:

  • Carey

I should clarify, we have many APIs to play with many aspects of Komodo BUT you happened across one aspect of Komodo that has been very difficult to extend, augment or enhance with a user friendly API. Sorry to be the bearer of bad news :frowning2:

Yeah thanks that’s what I figured out !

It would be very nice to be able to extend this file pane !

To be clear, you ARE able, it’s just a hassle.