PeterPanettone 158 Posted November 7, 2019 (edited) I've added a very useful feature to UCM: Showing the full file path of the selected unit in the StatusBar (this works in all tabs): Double-Clicking on the StatusBar copies the full file path displayed on the StatusBar to the clipboard! Here are the sources: GX_UsesExpert.zip Here is the link to the filed request: https://sourceforge.net/p/gexperts/feature-requests/82/ Edited November 7, 2019 by PeterPanettone 2 Share this post Link to post
PeterPanettone 158 Posted November 7, 2019 (edited) I have added a context popup menu to the UCM StatusBar: Here are the changed sources: GX_UsesExpert2.zip Edited November 7, 2019 by PeterPanettone Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 Fixed a small bug: The StatusBar context menu was shown (on right-click) even if there was no text in the StatusBar. Please download this newest version: GX_UsesExpert3.zip Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 (edited) Fixed another small bug: If the selected UnitFilePath does not exist (not GxOtaTryFindPathToFile) then the StatusBar text was not cleared. Please download this newest version: GX_UsesExpert4.zip Edited November 8, 2019 by PeterPanettone Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 • Fixed a bug: The context popup menu of the Units List was not available in the Identifiers tab.: • Improved the context popup menu of the Units List: • Added new menu item Copy this Identifier to the Clipboard only to the Units-List context menu of the Identifiers tab • Added new icons to the Units-List context menu Please download this newest version: GX_UsesExpert5.zip 1 Share this post Link to post
dummzeuch 1506 Posted November 8, 2019 Thanks, committed. Please use the current sources if you want to improve this further. I'll keep my hands off this code for now in order to not create any conflicts. I made Copy text to clipboard the default for the status bar context menu. The other changes, in particular to the dfm file are due to incompatibilities to Delphi 6. 2 Share this post Link to post
toms 29 Posted November 8, 2019 16 hours ago, PeterPanettone said: I have added a context popup menu to the UCM StatusBar: Here are the changed sources: GX_UsesExpert2.zip What's the difference between "Copy this TEXT" and "Copy this FILE" ? Personally I would name these items differently as they look a bit odd (probably a matter of taste): Like "Copy File to Clipboard" (or "Copy Path to Clipboard" ?) and "Copy Text to Clipboard" but I'm not quite sure what the function behind is doing. I would also rename "Show this File in WindowsExplorer" to "Open File Location" (Same terminology as Windows) or at least write "Windows Explorer" instead of "WindowsExplorer" 1 Share this post Link to post
dummzeuch 1506 Posted November 8, 2019 @PeterPanettone NOTE: I just found and fixed a bug in the Uses Clause Manager! https://sourceforge.net/p/gexperts/bugs/149/ Make sure you are using the latest sources! Share this post Link to post
dummzeuch 1506 Posted November 8, 2019 50 minutes ago, toms said: What's the difference between "Copy this TEXT" and "Copy this FILE" ? The first one works, the second one doesn't 😉 (Not implemented) It guess Peter's intention is to make this the same as pressing Ctrl+C in the Windows Explorer. Share this post Link to post
Fr0sT.Brutal 900 Posted November 8, 2019 From the point of usability, it's better to indicate somehow that popup menu is available. Otherwise the feature won't be used by nobody except authors )) Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 (edited) 1 hour ago, toms said: What's the difference between "Copy this TEXT" and "Copy this FILE" ? For an experienced computer user (and for developers in general), this should be pretty clear: • "Copy this TEXT" copies the TEXT on the StatusBar to the Windows clipboard and then can be PASTED into a text editor or into the IDE Source Code Editor. I deliberately used the wording "TEXT" (and not "path") because in the future the UCM StatusBar could contain other text types and not only file-paths. A very useful feature. • "Copy this FILE" copies the selected unit FILE to the Windows clipboard and then can be pasted (e.g. with CTRL-V) as a FILE into Windows Explorer (or your custom File Manager). A very useful feature. I am planning to implement this soon. Of course, if the StatusBar does not contain a path to an existing file, then this menu item will be disabled. This has already been implemented. You can see that the wording of the menu items was carefully selected for SPECIFIC SENSIBLE REASONS. Edited November 8, 2019 by PeterPanettone Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 (edited) 45 minutes ago, Fr0sT.Brutal said: From the point of usability, it's better to indicate somehow that popup menu is available. Otherwise the feature won't be used by nobody except authors )) You are right. I will add an explaining hint to the StatusBar, so anybody capable of moving the mouse pointer over the StatusBar can see this explanation. If anybody wishes it I could even add a clickable INFO or DROPDOWN icon to the StatusBar. Edited November 8, 2019 by PeterPanettone 1 Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 1 hour ago, toms said: write "Windows Explorer" instead of "WindowsExplorer" Done. 1 Share this post Link to post
toms 29 Posted November 8, 2019 25 minutes ago, PeterPanettone said: You can see that the wording of the menu items was carefully selected for SPECIFIC SENSIBLE REASONS. Does that also apply for my other remark? Quote I would also rename "Show this File in WindowsExplorer" to "Open File Location" (Same terminology as Windows) or at least write "Windows Explorer" instead of "WindowsExplorer" WindowsExplorer is written like this: Windows Explorer and has been renamed in Windows 10: https://support.microsoft.com/en-ie/help/4026617/windows-10-windows-explorer-has-a-new-name 1 Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 3 minutes ago, toms said: Windows Explorer and has been renamed in Windows 10: https://support.microsoft.com/en-ie/help/4026617/windows-10-windows-explorer-has-a-new-name Done. 1 Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 3 minutes ago, toms said: "Open File Location" This feature does not only open the File Location but also visibly selects the file in File Explorer. So using the wording "open the File Location" could possibly be misleading. What do you think? Share this post Link to post
dummzeuch 1506 Posted November 8, 2019 7 minutes ago, PeterPanettone said: This feature does not only open the File Location but also visibly selects the file in File Explorer. So using the wording "open the File Location" could possibly be misleading. What do you think? Since it is the same functionality as in Windows, when you right click on a shortcut, I think it's fine to call it the same: "Open file location" 1 Share this post Link to post
PeterPanettone 158 Posted November 8, 2019 (edited) 1 hour ago, dummzeuch said: Since it is the same functionality as in Windows, when you right click on a shortcut, I think it's fine to call it the same: "Open file location" Many wordings in Windows IMO are imprecise or outright naive. But for the sake of compatibility, I have changed it to "Open Location of This File". Is this fine for everybody? (In another context, I would have added shell functionality to the StatusBar, but this is not possible here). However, I could add a menu item that displays the Explorer file context menu of the file displayed in the StatusBar. That would be useful in several situations. Edited November 8, 2019 by PeterPanettone Share this post Link to post
dummzeuch 1506 Posted November 16, 2019 The full source filenames are now cached and added whenever they are available (e.g. when the identifier parser finishes or when the project units parser does not use the map file but the dpr), so they rarely need to be searched for again. This speeds up updating the status bar quite a lot and prevents the annoying lags when scrolling through the lists which was previously caused by the search. I haven't tried it on a slow computer yet, but I am confident that this change makes quite a difference there too. 1 1 Share this post Link to post
Dinar 22 Posted March 4, 2020 Please add a switch to the "Identifiers" tab using the Alt + I keyboard shortcut. Thanks in advance Share this post Link to post
dummzeuch 1506 Posted March 7, 2020 On 3/4/2020 at 6:41 AM, Dinar said: Please add a switch to the "Identifiers" tab using the Alt + I keyboard shortcut. Thanks in advance I was just about to say that Alt+I is already taken by some other function, because I distinctly remember not setting it for some reason, but apparently it isn't and my memory is wrong. So: Done in revision #3063 2 Share this post Link to post