Add "Show in the File Tree" functionality #271

Open
opened 2022-06-13 06:50:06 -04:00 by gkarag · 7 comments
gkarag commented 2022-06-13 06:50:06 -04:00 (Migrated from github.com)

I have a long list of folders in the file tree pane. For one or another reason when the tree is scrolled in the pane or folders are expanded or collapsed it can be difficult to find the place of the currently selected folder or file.

I would like to have in the context menu of the files in the playlist to have a new item "Show in the File Tree" and as a consequence of selecting it, the file would show in the folder structure in the file tree pane.

I have a long list of folders in the file tree pane. For one or another reason when the tree is scrolled in the pane or folders are expanded or collapsed it can be difficult to find the place of the currently selected folder or file. I would like to have in the context menu of the files in the playlist to have a new item "Show in the File Tree" and as a consequence of selecting it, the file would show in the folder structure in the file tree pane.
LennyLip commented 2022-07-17 11:50:27 -04:00 (Migrated from github.com)

I wanted to create the same issue, but it's already here. Some inspiration can be found in JetBrains IDE. Button for select opened file in the tree:
Screenshot 2022-07-17 at 18 46 16

I wanted to create the same issue, but it's already here. Some inspiration can be found in JetBrains IDE. Button for select opened file in the tree: <img width="631" alt="Screenshot 2022-07-17 at 18 46 16" src="https://user-images.githubusercontent.com/955994/179406158-c050b4b8-6156-497e-8c08-c26c21c41434.png">
kode54 commented 2022-07-17 21:40:30 -04:00 (Migrated from github.com)

And that only has "inspiration" in showing me how it should behave, not how to code it. Because that IDE is written in Java, and I need to write this in native Cocoa code, either Objective C or Swift.

And that only has "inspiration" in showing me how it should behave, not how to code it. Because that IDE is written in Java, and I need to write this in native Cocoa code, either Objective C or Swift.
kode54 commented 2022-07-17 21:51:36 -04:00 (Migrated from github.com)

Not to diss this. I like the idea. I can try to implement this one soonish. I just need to implement functionality into the tree handler. Single file highlighting will be a lot easier than making a full search feature as requested elsewhere.

Not to diss this. I like the idea. I can try to implement this one soonish. I just need to implement functionality into the tree handler. Single file highlighting will be a lot easier than making a full search feature as requested elsewhere.
kode54 commented 2022-07-17 21:53:08 -04:00 (Migrated from github.com)

I'm just kind of taking a bit of a break right now, because my last few days of marathons have left me dreaming about coding stuff, and that annoys me as I think of the wackiest things while doing that, and none of them are all that useful, and I have a hard time tearing away from it to actually drag myself out of bed in the morning.

I'm just kind of taking a bit of a break right now, because my last few days of marathons have left me dreaming about coding stuff, and that annoys me as I think of the wackiest things while doing that, and none of them are all that useful, and I have a hard time tearing away from it to actually drag myself out of bed in the morning.
LennyLip commented 2022-07-18 00:15:02 -04:00 (Migrated from github.com)

And that only has "inspiration" in showing me how it should behave, not how to code it. Because that IDE is written in Java, and I need to write this in native Cocoa code, either Objective C or Swift.

I meant just how it can look and works. I can't help, not familiar with Apple programming languages. But thank you for your hard work and take you time.

> And that only has "inspiration" in showing me how it should behave, not how to code it. Because that IDE is written in Java, and I need to write this in native Cocoa code, either Objective C or Swift. I meant just how it can look and works. I can't help, not familiar with Apple programming languages. But thank you for your hard work and take you time.
kode54 commented 2022-07-18 03:15:33 -04:00 (Migrated from github.com)

It won't be hard to focus a single item. There's already code in the tree implementation to pick out the node for a given path. The only problem is, if you haven't expanded a particular node, its contents aren't filled in yet. So walking down the tree to a particular item will involve asynchronously expanding a node, waiting for its contents to be enumerated, then walking further down the tree.

Contents stay cached and remain resident in the tree even if you close a node later, but are lost when you quit the app and restart it. Naturally, I could abuse the method that is used to restore the preferences settings that remember which branches you've expanded.

It won't be hard to focus a single item. There's already code in the tree implementation to pick out the node for a given path. The only problem is, if you haven't expanded a particular node, its contents aren't filled in yet. So walking down the tree to a particular item will involve asynchronously expanding a node, waiting for its contents to be enumerated, then walking further down the tree. Contents stay cached and remain resident in the tree even if you close a node later, but are lost when you quit the app and restart it. Naturally, I could abuse the method that is used to restore the preferences settings that remember which branches you've expanded.
gkarag commented 2022-07-18 05:13:25 -04:00 (Migrated from github.com)

For the record I happen to use an open source editor on Mac, TextMate, that has such functionality. It has "File Browser" menu from which one could select the currently edited file that may not be immediately selected in the browser.

For the record I happen to use an open source editor on Mac, TextMate, that has such functionality. It has "File Browser" menu from which one could select the currently edited file that may not be immediately selected in the browser.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chris/Cog#271
No description provided.