@@ -42,6 +42,7 @@ define(function (require, exports, module) {
4242 FileViewController = require ( "project/FileViewController" ) ,
4343 ViewUtils = require ( "utils/ViewUtils" ) ,
4444 KeyEvent = require ( "utils/KeyEvent" ) ,
45+ KeyBindingManager = require ( "command/KeyBindingManager" ) ,
4546 paneListTemplate = require ( "text!htmlContent/working-set.html" ) ,
4647 Strings = require ( "strings" ) ,
4748 _ = require ( "thirdparty/lodash" ) ,
@@ -1652,6 +1653,34 @@ define(function (require, exports, module) {
16521653 delete _views [ view . paneId ] ;
16531654 view . destroy ( ) ;
16541655 } ) ;
1656+
1657+ // Add tooltip on hover for file status icon (pin/close)
1658+ $ ( document ) . on ( "mouseenter" , "#working-set-list-container .file-status-icon" , function ( ) {
1659+ const $icon = $ ( this ) ;
1660+ const isPinned = $icon . hasClass ( "pinned" ) ;
1661+
1662+ if ( isPinned ) {
1663+ // Show "Unpin File" tooltip
1664+ const pinBindings = KeyBindingManager . getKeyBindings ( Commands . FILE_PIN ) ;
1665+ const pinShortcut = pinBindings . length > 0
1666+ ? KeyBindingManager . formatKeyDescriptor ( pinBindings [ pinBindings . length - 1 ] . displayKey )
1667+ : "" ;
1668+ const tooltip = pinShortcut
1669+ ? `${ Strings . CMD_FILE_UNPIN } (${ pinShortcut } )`
1670+ : Strings . CMD_FILE_UNPIN ;
1671+ $icon . attr ( "title" , tooltip ) ;
1672+ } else if ( $icon . hasClass ( "can-close" ) ) {
1673+ // Show "Close File" tooltip
1674+ const closeBindings = KeyBindingManager . getKeyBindings ( Commands . FILE_CLOSE ) ;
1675+ const closeShortcut = closeBindings . length > 0
1676+ ? KeyBindingManager . formatKeyDescriptor ( closeBindings [ closeBindings . length - 1 ] . displayKey )
1677+ : "" ;
1678+ const tooltip = closeShortcut
1679+ ? `${ Strings . CMD_FILE_CLOSE } (${ closeShortcut } )`
1680+ : Strings . CMD_FILE_CLOSE ;
1681+ $icon . attr ( "title" , tooltip ) ;
1682+ }
1683+ } ) ;
16551684 } ) ;
16561685
16571686 /**
0 commit comments