New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add document tab context menu #1664
Comments
|
Note, this requested is tracked in #7289 A similar request: https://support.rstudio.com/hc/en-us/community/posts/115007964793-Feature-suggestion-Copy-path-on-Source-tab-right-click-menu I would like to suggest a feature to add to the right-click menu of the tabs in the Source panel, i.e. the list of opened scripts. This right-click menu currently only contains "Reload" and "Inspect" (like the right-click menu on the tabs of all the other panels). It would be nice to have the option to "Copy file name" and "Copy full path", so I could paste this into my code (for use in source() commands). Currently, I have to to navigate to the source file outside of R to copy long file names, which is a minor nuisance. Thank you! |
|
It would also be useful to have the ability to rename files within such a context menu. See also: #2199 |
|
It might be possible to do what we want by intercepting the right-click and drawing our own menu. If not (and/or we only want to do this for desktop), QtWebEngine supports custom context menus. We already do some customization here: rstudio/src/cpp/desktop/DesktopWebView.cpp Lines 143 to 165 in 98a8b90
|
|
We also do this for the Git pane, directly from GWT: It looks like we could likely just add a GWT ContextMenuHandler as required? rstudio/src/gwt/src/org/rstudio/core/client/widget/MultiSelectCellTable.java Lines 119 to 125 in 03c7e55
|
|
Also, from https://community.rstudio.com/t/sort-source-file-tabs-alphabetically-in-ide/5760, a request to sort document tabs (e.g. alphanumerically) |
|
Implemented via #8375 |
Verify FailedFailure Points / Repro StepsClose All Others context menu option fails to function as expected for documents in Source Editor.
Successful Verification Points
|
|
Looking into it, thanks for the detailed notes. |
|
Opened a new issue for the identified failure (#8855), closing this to mark the overall creation of context menu as completed. |
|
There was a pointer to this issue from https://community.rstudio.com/t/sort-source-file-tabs-alphabetically-in-ide/5760 a few years ago. However, it seems that request for a way to sort the tabs never made it into the context menu. Is there somewhere else where suggestions for this new context menu should be posted? |
|
@dmurdoch Yup, just file them as a new issue. |

Actions similar to Close, Close All, and Close All Except Current would make sense in a document tab’s context menu. I always find myself right-clicking tabs and expecting it.
Since Close and Close All Except This would refer to the right-clicked tab in the context menu, only Close All would reuse the
closeAllSourceDocsaction.The text was updated successfully, but these errors were encountered: