Menu

#283 Uses Clause Manager Identifier Duplicate Results

As_Designed
closed-wont-fix
None
5
2022-04-01
2022-03-15
No

GExperts Bug Report

Description:
The Identifier Tab in the "Uses Clause Manager" contains duplicate entries.

Bug Details:
The bug is reproducible 100% of the time

Steps:
1. Start Delphi 10.4 from the start menu

  1. Open any project

  2. Place the cursor over any identifier

  3. Open the menus "GExperts" -> "Uses Clause Manager" (or use your assigned hotkey)

  4. Click the "Identifiers" Tab. It will at time contain duplicate entries

  5. The attached screenshots that show duplicate entries for "TPageControl" and "TWinControl". This happens with other identifiers also.

Configuration:
OS: Windows 10 (1903) (kernel 10.0.19041 build 1566)
GExperts: GExpertsRS104.dll 1.3.20.3804 from 2022-01-30 16:15:46
IDE: ideRS104U2
ComCtl32: <unknown></unknown>

Installed Experts:
$(BDS)\Bin\Scooter.BeyondCompare.Expert.dll = Beyond Compare IDE Package
C:\Program Files (x86)\GExperts for RAD Studio 10.4\GExpertsRS104.dll = GExperts

Installed Packages:
__Embarcadero Metropolis UI Live Tile Standard Components = $(BDSBIN)\dclMetropolisUILiveTile270.bpl
Embarcadero XML Components = $(BDSBIN)\dclxml270.bpl
Embarcadero Git Integration = $(BDSBIN)\gitide270.bpl
Embarcadero Mercurial Integration = $(BDSBIN)\hgide270.bpl
Embarcadero Subversion Integration = $(BDSBIN)\svnide270.bpl
Embarcadero LiveBindings Components = $(BDSBIN)\dclbindcomp270.bpl
Embarcadero Experts UI Components = $(BDSBIN)\ExpertsUI270.bpl
Embarcadero Common Design Resources = $(BDSBIN)\dclcommon270.bpl
Embarcadero LiveBindings Components FireMonkey = $(BDSBIN)\dclbindcompfmx270.bpl
Embarcadero - RTL Component Editors = $(BDSBIN)\dclrtl270.bpl
Embarcadero - Tethering Component Editors = $(BDSBIN)\dcltethering270.bpl
Embarcadero ActionBar Components = $(BDSBIN)\dclact270.bpl
Embarcadero Database Components = $(BDSBIN)\dcldb270.bpl
Embarcadero Standard Components = $(BDSBIN)\dclstd270.bpl
Embarcadero Editor Emacs Enhancements = $(BDSBIN)\dclemacsedit270.bpl
Embarcadero Markup Language Wizards = $(BDSBIN)\dclmlwiz270.bpl
Embarcadero QuickEdit Designer 2.0 = $(BDSBIN)\dclQuickEdit270.bpl
Embarcadero ShareContract Components = $(BDSBIN)\dclshare270.bpl
Embarcadero WinX Controls = $(BDSBIN)\dclwinx270.bpl
Embarcadero Sample Debugger Visualizers = $(BDSBIN)\samplevisualizers270.bpl
Embarcadero Control Panel Applet Package = $(BDSBIN)\applet270.bpl
Embarcadero Usertility Analytics Component = $(BDSBIN)\dclappanalytics270.bpl
Embarcadero LiveBindings Components VCL = $(BDSBIN)\dclbindcompvcl270.bpl
Embarcadero MyBase DataAccess Components = $(BDSBIN)\dclmid270.bpl
Embarcadero Internet Server Wizards = $(BDSBIN)\dclnetwiz270.bpl
Embarcadero Internet Components = $(BDSBIN)\dclnet270.bpl
Embarcadero Experts Creators Components = $(BDSBIN)\ExpertsCreators270.bpl
Embarcadero VCL Database Components = $(BDSBIN)\dclvcldb270.bpl
Delphi 1.0 Compatibility Components = $(BDSBIN)\dcl31w270.bpl
Embarcadero Sample Components = $(BDSBIN)\dclsmp270.bpl
Embarcadero Editor Script Enhancements = $(BDSBIN)\dclsmpedit270.bpl
Embarcadero Touch Components = $(BDSBIN)\dcltouch270.bpl
Embarcadero Mobile Wizard Help = $(BDSBIN)\MobileWizardExpert270.bpl
Data Explorer Reusable Services = $(BDSBIN)\DataExplorerService270.bpl
Embarcadero Driver Components = $(BDSBIN)\dclDBXDrivers270.bpl
Embarcadero Intro Driver Components = $(BDSBIN)\dclDBXDriversInt270.bpl
IP Abstraction Indy Implementation Design Time = $(BDSBIN)\dclIPIndyImpl270.bpl
Embarcadero REST-Backend Components = $(BDSBIN)\dclRESTBackendComponents270.bpl
Embarcadero REST-Library Components (Designtime) = $(BDSBIN)\dclRESTComponents270.bpl
Embarcadero dbExpress Components = $(BDSBIN)\dcldbx270.bpl
Embarcadero SimpleDataset Component (DBX) = $(BDSBIN)\dcldbxcds270.bpl
Embarcadero Cloud management components = $(BDSBIN)\dclCloudService270.bpl
FireDAC Data Explorer Integration = $(BDSBIN)\DataExplorerFireDACPlugin270.bpl
Embarcadero FireDAC Components = $(BDSBIN)\dclFireDAC270.bpl
LiveBinding Expression Components FireDac = $(BDSBIN)\dclBindCompFireDAC270.bpl
Embarcadero FMX FireDAC Components = $(BDSBIN)\dclFMXFireDAC270.bpl
Embarcadero VCL FireDAC Components = $(BDSBIN)\dclVclFireDAC270.bpl
Embarcadero FMX Standard Components = $(BDSBIN)\dclfmxstd270.bpl
Embarcadero Style Designer Package = $(BDSBIN)\fmxstyledesigner270.bpl
Indy 10 Core Design Time = $(BDSBIN)\dclIndyCore270.bpl
Indy 10 Protocols Design Time = $(BDSBIN)\dclIndyProtocols270.bpl
Edge WebView2 Components = $(BDSBIN)\dcledge270.bpl
Internet Explorer Components = $(BDSBIN)\dclie270.bpl
DBExpress Data Explorer Integration = $(BDSBIN)\DataExplorerDBXPlugin270.bpl
DBExpress InterBase Data Explorer Integration = $(BDSBIN)\DataExplorerDBXPluginInt270.bpl
LiveBindings Expression Components DbExpress = $(BDSBIN)\dclbindcompdbx270.bpl
Embarcadero XML Transform Provider Components = $(BDSBIN)\dcldsnapxml270.bpl
Embarcadero DataSnap Connection Components = $(BDSBIN)\dclmcn270.bpl
Embarcadero SOAP Midas Components = $(BDSBIN)\dclsoapmidas270.bpl
Embarcadero SOAP Components = $(BDSBIN)\dclsoap270.bpl
Embarcadero SOAP Server Components = $(BDSBIN)\dclsoapserver270.bpl
Embarcadero Internet DB Components = $(BDSBIN)\dclnetdb270.bpl
Embarcadero ADO DB Components = $(BDSBIN)\dclado270.bpl
Mustangpeak Common Library Delphi DesignTime Package = C:\Users\Public\Documents\Embarcadero\Studio\21.0\bpl\MPCommonLibDD270.bpl
MustangPeak EasyListview Designtime Package = C:\Users\Public\Documents\Embarcadero\Studio\21.0\bpl\EasyListviewDD270.bpl
FireMonkey App Wizard = E:\Documents\Embarcadero\Studio\21.0\CatalogRepository\FireMonkeyAppTemplate-1.0\FMXAppWizard270.bpl
JCL Package containing common units for JCL Experts = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclBaseExpert270.bpl
JCL Debug IDE extension = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclDebugExpert270.bpl
JCL Project Analyzer = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclProjectAnalysisExpert270.bpl
JCL Open and Save IDE dialogs with favorite folders = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclFavoriteFoldersExpert270.bpl
JCL Package containing repository wizards = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclRepositoryExpert270.bpl
JCL Debug Window of XMM registers = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclSIMDViewExpert270.bpl
JCL Stack Trace Viewer = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JclStackTraceViewerExpert270.bpl
JVCL Application and Form Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvAppFrmDesign270.bpl
JVCL Core Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvCoreDesign270.bpl
JVCL Band Objects = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvBandsDesign270.bpl
JVCL Non-Visual Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvCmpDesign270.bpl
JVCL Visual Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvControlsDesign270.bpl
JVCL Encryption and Compression = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvCryptDesign270.bpl
JVCL Custom Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvCustomDesign270.bpl
JVCL Database Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvDBDesign270.bpl
JVCL Dialog Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvDlgsDesign270.bpl
JVCL Docking Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvDockingDesign270.bpl
JVCL DotNet Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvDotNetCtrlsDesign270.bpl
JVCL Globus Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvGlobusDesign270.bpl
JVCL HMI Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvHMIDesign270.bpl
JVCL Jans Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvJansDesign270.bpl
JVCL Managed Threads = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvManagedThreadsDesign270.bpl
JVCL Multimedia and Image Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvMMDesign270.bpl
JVCL Network Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvNetDesign270.bpl
JVCL Page Style Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvPageCompsDesign270.bpl
JVCL Interpreter Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvPascalInterpreterDesign270.bpl
JVCL Plugin Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvPluginSystemDesign270.bpl
JVCL Print Preview Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvPrintPreviewDesign270.bpl
JVCL Runtime Design Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvRuntimeDesignDesign270.bpl
JVCL Standard Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvStdCtrlsDesign270.bpl
JVCL System Components = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvSystemDesign270.bpl
JVCL Time Framework = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvTimeFrameworkDesign270.bpl
JVCL Wizard = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvWizardsDesign270.bpl
JVCL XP Controls = C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\JvXPCtrlsDesign270.bpl
Microsoft Office 2000 Sample Automation Server Wrapper Components = $(BDSBIN)\dcloffice2k270.bpl
Microsoft Office XP Sample Automation Server Wrapper Components = $(BDSBIN)\dclofficexp270.bpl

Installed IDE Packages:
Embarcadero GetIt Package = $(BDS)\Bin\GetIt270.bpl
Embarcadero Guided Tour Package = $(BDS)\Bin\GuidedTour270.bpl
Embarcadero IDE VCL Package = $(BDS)\Bin\IDEvcl270.bpl
Embarcadero Theme Package = $(BDS)\Bin\ModernTheme270.bpl
Embarcadero Theme Package = $(BDS)\Bin\darktheme270.bpl
Embarcadero Theme Package = $(BDS)\Bin\themeloader270.bpl
CodeQuery API Package = $(BDS)\bin\codequeryide270.bpl
Embarcadero Multi-Device Preview package = $(BDS)\Bin\MultidevicePreview270.bpl
Assembly Browser Package = $(BDS)\Bin\asmview270.bpl
(Untitled) = $(BDS)\Bin\dbkdebugide270.bpl
Delphi Win32 Platform = $(BDS)\Bin\delphiwin32270.bpl
.NET Core IDE Package = $(BDS)\Bin\dotnetcoreide270.bpl
(Untitled) = $(BDS)\bin\exceptiondiag270.bpl
__(Untitled) = $(BDS)\bin\fileexplorer270.bpl
(Untitled) = $(BDS)\bin\historyide270.bpl
HtmlHelp Viewer = $(BDS)\Bin\htmlhelp1270.bpl
__HtmlHelp Viewer = $(BDS)\Bin\htmlhelp2270.bpl
IDE File filters = $(BDS)\bin\idefilefilters270.bpl
Pluggable Tree View Package = $(BDS)\bin\plugview270.bpl
Value Data: Project and template library package = $(BDS)\Bin\projpageide270.bpl
Start Page IDE Package = $(BDS)\Bin\startpageide270.bpl
TypeLibrary Browser Package = $(BDS)\Bin\tlbview270.bpl
LSP feature = $(BDS)\Bin\IDELSP270.bpl
HtmlHelp Viewer = $(BDS)\Bin\comcore270.bpl
(Untitled) = $(BDS)\Bin\projecttargets270.bpl
.NET Core IDE Package = $(BDS)\Bin\vclmenudesigner270.bpl
Component Toolbar Package = $(BDS)\bin\comptoolbar270.bpl
Embarcadero Tracking System Package = $(BDS)\Bin\TrackingSystem270.bpl
(Untitled) = $(BDS)\Bin\gdbdebugcore270.bpl
(Untitled) = $(BDS)\Bin\gdbdebugide270.bpl
(Untitled) = $(BDS)\Bin\ios32debugide270.bpl
(Untitled) = $(BDS)\Bin\ios64debugide270.bpl
Embarcadero FireUI Live Preview Package = $(BDS)\Bin\LivePreview270.bpl
Embarcadero Mirror Package = $(BDS)\Bin\MirrorHub270.bpl
(Untitled) = $(BDS)\Bin\codetemplates270.bpl
Core IDE Pro Package = $(BDS)\bin\coreproide270.bpl
(Untitled) = $(BDS)\bin\dbkdebugproide270.bpl
(Untitled) = $(BDS)\Bin\profiledeployide270.bpl
(Untitled) = $(BDS)\Bin\profilemgride270.bpl
Embarcadero SDK Manager = $(BDS)\Bin\sdkmgride270.bpl
Core Refactoring Package = $(BDS)\bin\refactoride270.bpl
ToDo = $(BDS)\bin\todoide270.bpl
(Untitled) = $(BDS)\Bin\DataExplorerIDE270.bpl
Visualization IDE Service Package = $(BDS)\Bin\VisualizationServiceIDE270.bpl
Embarcadero Mobile Device Manager Package = $(BDS)\Bin\DeviceManager270.bpl
(Untitled) = $(BDS)\bin\htmide270.bpl
(Untitled) = $(BDS)\bin\mlcc270.bpl
(Untitled) = $(BDS)\Bin\iteidew32270.bpl
(Untitled) = $(BDS)\Bin\tgide270.bpl
(Untitled) = $(BDS)\Bin\win64debugide270.bpl
Delphi Win64 Platform = $(BDS)\Bin\delphiwin64270.bpl
_(untitled) = $(BDS)\bin\getitide270.bpl

GExperts Experts:
1 = CodeLibrarian
0 = GrepSearch
0 = GrepResults
0 = GrepNextItem
0 = GrepPrevItem
1 = ExpertManager
1 = ASCIIChart
1 = BackupProject
1 = BookmarksExpert
1 = ClassBrowser
1 = CleanDirectories
0 = ClipboardHistory
1 = ComponentGrid
1 = RenameComponents
1 = ComponentsToCode
1 = CopyComponentNames
1 = UsesClauseMgr
1 = EditorExpertsMenu
1 = FavoriteFiles
1 = FindComponentReference
1 = HideComponents
1 = IDEMenuShortCuts
1 = InsertAutoToDo
1 = MacroLibrary
0 = MacroLibRecord
0 = MacroLibPlayback
1 = MessageDialog
1 = OpenFile
0 = PEInformation
1 = ProcedureList
1 = ProjectDependencies
1 = ProjOptionSets
0 = CodeProofreader
1 = ReplaceComponents
0 = SetComponentProperties
1 = SetFocusControl
1 = SourceExport
1 = SetTabOrder
1 = ToDoList
1 = ReselectDesktop
1 = TKeyboardShortcutsExpert
0 = TAddDockWindowExpert
1 = SelectComponents
0 = GotoExpert
1 = FocusCodeEditor
1 = TFormHotkeysExpert
1 = FilterExceptions
1 = GrepMenuEntry
1 = GrepResuls
1 = TEditPathExpert
0 = TExplicitFilterExpert

CPU:
# Processors: 4
Type: Intel 586 model 48 Stepping 1
Speed: 3776.79 MHz

Keyboard:
Type 0: IBM enhanced (101 or 102-key) keyboard with OEM FKeys
Layout: US (us) in KBDUS.DLL

Locale Info:
Number of Digits: '2'
Leading Zero: '1'
List Separators: ','
Grouping: '3;0'
Decimal Separator: '.'
Group Separator: ','
Monetary Grouping: '3;0'
Monetary Decimal Separator: '.'
Monetary Group Separator: ','

2 Attachments

Discussion

  • Thomas Mueller

    Thomas Mueller - 2022-03-19
    • status: open --> pending
    • assigned_to: Thomas Mueller
    • Group: New --> Need_More_Info
     
  • Thomas Mueller

    Thomas Mueller - 2022-03-19

    For the two given examples this is caused by the forward declaration of the classes, e.g.:

    type
      TWinControl = class
    
    // .... lots of othter code
    
      TWinControl = class(TControl)
        // actual class declaration
      end;
    

    That the uses manager shows both is a feature, not a bug, because it allows to jump to the lines containing each of the declarations by pressing the Open button (or Ctrl+O).
    You mention other cases. Is there any where there is no forward declaration? If yes, please add these examples to the report, otherwise, please let me know so I can close it.

     
    • Anonymous

      Anonymous - 2022-03-21

      That the uses manager shows both is a feature, not a bug, because it allows to jump to the lines containing each of the declarations by pressing the Open button (or Ctrl+O).

      I just seems odd that the Uses Clause Manager (UCM ) shows what appears to be "duplicate" entries. I understand your reasoning about why it does this. But it does not differentiate between the assorted items. For example, if I use UCM on the identifier "IntToHex", it lists 11 entries, all of which show "IntToHex" in unit "System.SysUtils", with no way of differentiating between them.

      I do not make use of the "Open" button with UCM, so maybe a compromise?

      • Perhaps you can add an option checkbox to the configuration dialog for UCM to allow users such as myself to eliminate the perceived clutter by only having a single entry for any identifier to be shown in the list.
      • Obviously when an identifier appears across multiple units, it should not be seen as a "duplicate" ("TForm" appears in both "FMX.Forms" and "Vcl.Forms")

      The other cases I mention cases because this happens with numerous identifiers, not just the ones I originally mentioned.

      Also, regarding the "Open Unit" button of UCM.

      While I do not use this particular UCM feature myself, I just noticed now after reading your reply here is that when I click "Open Unit" or use the CTRL+O shortcut, then UCM does indeed open the unit at the selected identifier. Only the entire Delphi IDE app loses input focus and the last active app in Windows becomes the active app. As an example, if "Notepad++" was active before opening Delphi 10.4, then when I use UCM Open Unit, then Notepad++ becomes the active application again, requiring me to manually switch back to Delphi.

      Please consider my proposal to filter out perceived duplicate entries in UCM.

      Thank you for your time.

       

      Last edit: Anonymous 2022-03-21
  • Thomas Mueller

    Thomas Mueller - 2022-04-01
    • status: pending --> closed-wont-fix
    • Group: Need_More_Info --> As_Designed
     
  • Thomas Mueller

    Thomas Mueller - 2022-04-01

    Please file feature request(s) for your suggestion(s), so I will find them again. They are likely to get lost if there is only comment, especially since I am going to close this issue now.

    As for the IDE losing focus when using Open Unit: I cannot reproduce this. It might possibly have been fixed by a recent change, so if it is an annoyance for you, you can simply get the sources and compile your own dll as described here.

     

Log in to post a comment.