├── .gitattributes
├── .gitignore
├── .gitmodules
├── Contributing.md
├── Delphinus.Info.json
├── Delphinus.Install.json
├── IDEExplorer.cfg
├── IDEExplorer.dpr
├── IDEExplorer.dproj
├── IDEExplorer.ithelper
├── IDEExplorer.res
├── IDEExplorerITHVerInfo.RC
├── Icons
├── IDE Explorer 48x48 Icon.bmp
├── IDE Explorer.xcf
├── New IDE Explorer 24x24 Icon.bmp
├── New IDE Explorer 48x48 Icon.bmp
├── Splash Screen Icons.xcf
├── SplashScreenImage24x24.xcf
└── SplashScreenImage48x48.xcf
├── Images
├── Char.bmp
├── Dcu.ico
├── Dfm.ico
├── Dpk.ico
├── Dpr.ico
├── IDEExplorerInheritance.gif
├── IDEExplorerNewEvents.gif
├── IDEExplorerNewFields.gif
├── IDEExplorerNewHeirarchies.gif
├── IDEExplorerNewMethods.gif
├── IDEExplorerNewProperties.gif
├── IDEExplorerOldProperties.gif
├── IDEExplorerProperties.gif
├── MainIcon.ico
├── Pas.ico
├── array.bmp
├── class.bmp
├── classref.bmp
├── dynarray.bmp
├── enum.bmp
├── float.bmp
├── int64.bmp
├── integer.bmp
├── interface.bmp
├── lstring.bmp
├── method.bmp
├── pointer.bmp
├── private.bmp
├── procedure.bmp
├── protected.bmp
├── public.bmp
├── published.bmp
├── record.bmp
├── set.bmp
├── string.bmp
├── unknown.bmp
├── ustring.bmp
├── variant.bmp
├── wChar.bmp
└── wstring.bmp
├── License.md
├── README.md
├── Source
├── CompilerDefinitions.inc
├── IDEExplorer.AboutBox.pas
├── IDEExplorer.Constants.pas
├── IDEExplorer.ExplorerForm.dfm
├── IDEExplorer.ExplorerForm.pas
├── IDEExplorer.Functions.pas
├── IDEExplorer.Interfaces.pas
├── IDEExplorer.OLDRTTIFunctions.pas
├── IDEExplorer.ProgressForm.dfm
├── IDEExplorer.ProgressForm.pas
├── IDEExplorer.ProgressMgr.pas
├── IDEExplorer.RTTIFunctions.pas
├── IDEExplorer.ResourceStrings.pas
├── IDEExplorer.SplashScreen.pas
├── IDEExplorer.Types.pas
├── IDEExplorer.Wizard.pas
└── LibrarySuffixes.inc
├── SplashScreenIcon.RC
└── SplashScreenIcon.RES
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Uncomment these types if you want even more clean repository. But be careful.
2 | # It can make harm to an existing project source. Read explanations below.
3 | #
4 | # Resource files are binaries containing manifest, project icon and version info.
5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
6 | #*.res
7 | #
8 | # Type library file (binary). In old Delphi versions it should be stored.
9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
10 | #*.tlb
11 | #
12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
13 | # Uncomment this if you are not using diagrams or use newer Delphi version.
14 | #*.ddp
15 | #
16 | # Visual LiveBindings file. Added in Delphi XE2.
17 | # Uncomment this if you are not using LiveBindings Designer.
18 | #*.vlb
19 | #
20 | # Deployment Manager configuration file for your project. Added in Delphi XE2.
21 | # Uncomment this if it is not mobile development and you do not use remote debug feature.
22 | #*.deployproj
23 | #
24 | # C++ object files produced when C/C++ Output file generation is configured.
25 | # Uncomment this if you are not using external objects (zlib library for example).
26 | #*.obj
27 | #
28 |
29 | # Delphi compiler-generated binaries (safe to delete)
30 | *.exe
31 | *.dll
32 | *.bpl
33 | *.bpi
34 | *.dcp
35 | *.so
36 | *.apk
37 | *.drc
38 | *.map
39 | *.dres
40 | *.rsm
41 | *.tds
42 | *.dcu
43 | *.lib
44 | *.a
45 | *.o
46 | *.ocx
47 |
48 | # Delphi autogenerated files (duplicated info)
49 | *.hpp
50 | *Resource.rc
51 |
52 | # Delphi local files (user-specific info)
53 | *.local
54 | *.identcache
55 | *.projdata
56 | *.tvsconfig
57 | *.dsk
58 |
59 | # Delphi history and backups
60 | __history/
61 | __recovery/
62 | *.~*
63 |
64 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi)
65 | *.stat
66 |
67 | # =========================
68 | # Operating System Files
69 | # =========================
70 |
71 | # OSX
72 | # =========================
73 |
74 | .DS_Store
75 | .AppleDouble
76 | .LSOverride
77 |
78 | # Thumbnails
79 | ._*
80 |
81 | # Files that might appear in the root of a volume
82 | .DocumentRevisions-V100
83 | .fseventsd
84 | .Spotlight-V100
85 | .TemporaryItems
86 | .Trashes
87 | .VolumeIcon.icns
88 |
89 | # Directories potentially created on remote AFP share
90 | .AppleDB
91 | .AppleDesktop
92 | Network Trash Folder
93 | Temporary Items
94 | .apdisk
95 |
96 | # Windows
97 | # =========================
98 |
99 | # Windows image file caches
100 | Thumbs.db
101 | ehthumbs.db
102 |
103 | # Folder config file
104 | Desktop.ini
105 |
106 | # Recycle Bin used on file shares
107 | $RECYCLE.BIN/
108 |
109 | # Windows Installer files
110 | *.cab
111 | *.msi
112 | *.msm
113 | *.msp
114 |
115 | # Windows shortcuts
116 | *.lnk
117 | *.d
118 | IDEExplorer.gex
119 | *.res
120 | *.dct
121 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Virtualtrees"]
2 | path = Virtualtrees
3 | url = https://github.com/DGH2112/Virtual-Treeview-6.5.0-IDE
4 |
--------------------------------------------------------------------------------
/Contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to IDE Explorer
2 |
3 | Please try and follows the things that are layed out below as it will make it easier to accept a pull request however not following the below does not necessarily exclude a pull request from being accepted.
4 |
5 | ## Git Flow
6 |
7 | For IDE Explorer I use Git as the version control but I also use [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for the development cycles. The main development is undertaken in the **Development** branch with stable releases being in the **master**. All pull requests should be made from the **Development** branch, prefereably using **Feature** branches or **BugFix** branches. I've defined prefixes for these already in the `.gitconfig` file. You should submit onyl one change per pull request at a time to make it easiler to review and accept the pull request.
8 |
9 | Tools wise, I generally use [SourceTree](https://www.sourcetreeapp.com/) but that does not support Git Flow's **BugFix** functionality so I drop down to the command prompt to create **BugFix** branches as SourceTree can _Finish_ any type of open branch in Git Flow.
10 |
11 | ## Creating Pull Requests
12 |
13 | Having not done this before as I've always been the sole contributor to my repositories so I borrowed the essense of the following from the [DUnitX](https://github.com/VSoftTechnologies/DUnitX) project:
14 |
15 | 1. Create a [GitHub Account](https://github.com/join);
16 | 2. Fork the IDE Explorer
17 | Repository and setup your local repository as follows:
18 | * [Fork the repository](https://help.github.com/articles/fork-a-repo);
19 | * Clone your Fork to your local machine;
20 | * Configure upstream remote to the **Development**
21 | IDE Explorer
22 | [repository](https://github.com/DGH2112/Integrated-Testing-Helper);
23 | 3. For each change you want to make:
24 | * Create a new **Feature** or **BugFix** branch for your change;
25 | * Make your change in your new branch;
26 | * **Verify code compiles for ALL supported RAD Studio version (see below) and unit tests still pass**;
27 | * Commit change to your local repository;
28 | * Push change to your remote repository;
29 | * Submit a [Pull Request](https://help.github.com/articles/using-pull-requests);
30 | * Note: local and remote branches can be deleted after pull request has been accepted.
31 |
32 | **Note:** Getting changes from others requires [Syncing your Local repository](https://help.github.com/articles/syncing-a-fork) with the **Development** IDE Explorer repository. This can happen at any time.
33 |
34 | ## Dependencies
35 |
36 | IDE Explorer has a new dependencies on VirtualTrees. There is a sub-module included in the repository for a custom version of 6.5.0 which suppoprts RAD Studio IDE theming.
37 |
38 | ## Project Configuration
39 |
40 | The IDE Explorer Open Tools API project uses a single projects file (`.DPR`) to compile to mutliple versions of RAD Studio by use 2 include files: one for compiler specific coding and the second to implement the correct suffix for the DLL.
41 |
42 | The current code base only supports RAD Studio XE3 and above.
43 |
44 | ## Rationale
45 |
46 | The following is a brief description of the rationale behind IDE Explorer. I will hopefully write more later.
47 |
48 | This plug-in display a model form and iterate through the avauilable forms in the IDE and display a treeview of these forms and their components. If you click on a form or component, the fields, methods, properties and events for that cmoponent are displayed using the new RTTI in RAD Studio.
49 |
50 | regards
51 |
52 | David Hoyle Jan 2022.
53 |
--------------------------------------------------------------------------------
/Delphinus.Info.json:
--------------------------------------------------------------------------------
1 | {
2 | "id":"{45B8BA43-B67E-4511-BB20-E456C12060AF}",
3 | "name":"IDE Explorer",
4 | "license_type":"[custom]",
5 | "license_file":"License.md",
6 | "platforms":"Win32",
7 | "package_compiler_min":21,
8 | "package_compiler_max":32,
9 | "compiler_min":21,
10 | "compiler_max":32
11 | }
--------------------------------------------------------------------------------
/Delphinus.Install.json:
--------------------------------------------------------------------------------
1 | {
2 | "browsing_pathes":[
3 | {
4 | "pathes":"Source",
5 | "platforms":"Win32"
6 | }
7 | ],
8 | "source_folders":[
9 | {
10 | "folder":"."
11 | },
12 | {
13 | "folder":"Icons",
14 | "recursive":true
15 | },
16 | {
17 | "folder":"Images",
18 | "recursive":true
19 | },
20 | {
21 | "folder":"Packages",
22 | "recursive":true
23 | },
24 | {
25 | "folder":"Source",
26 | "recursive":true
27 | }
28 | ],
29 | "projects":[
30 | {
31 | "project":"Packages\\IDEExplorerXE.dpk",
32 | "compiler":22
33 | },
34 | {
35 | "project":"Packages\\IDEExplorerXE2.dpk",
36 | "compiler":23
37 | },
38 | {
39 | "project":"Packages\\IDEExplorerXE3.dpk",
40 | "compiler":24
41 | },
42 | {
43 | "project":"Packages\\IDEExplorerXE4.dpk",
44 | "compiler":25
45 | },
46 | {
47 | "project":"Packages\\IDEExplorerXE5.dpk",
48 | "compiler":26
49 | },
50 | {
51 | "project":"Packages\\IDEExplorerXE6.dpk",
52 | "compiler":27
53 | },
54 | {
55 | "project":"Packages\\IDEExplorerXE7.dproj",
56 | "compiler":28
57 | },
58 | {
59 | "project":"Packages\\IDEExplorerXE8.dpk",
60 | "compiler":29
61 | },
62 | {
63 | "project":"Packages\\IDEExplorerXE10.dpk",
64 | "compiler":30
65 | },
66 | {
67 | "project":"Packages\\IDEExplorerXE101.dproj",
68 | "compiler":31
69 | },
70 | {
71 | "project":"Packages\\IDEExplorerXE102.dproj",
72 | "compiler":32
73 | }
74 | ]
75 | }
--------------------------------------------------------------------------------
/IDEExplorer.cfg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/IDEExplorer.cfg
--------------------------------------------------------------------------------
/IDEExplorer.dpr:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module defines a Window DLL project for a RAD Studio IDE plug-in to display inforamtion about the
4 | IDE forms and components.
5 |
6 | @Author David Hoyle
7 | @Version 1.012
8 | @Date 04 Jan 2022
9 |
10 | @license
11 |
12 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
13 | browse the internals of the RAD Studio IDE.
14 |
15 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
16 |
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program. If not, see .
29 |
30 | @nocheck EmptyBeginEnd
31 |
32 | **)
33 | Library IDEExplorer;
34 |
35 | {$R 'IDEExplorerITHVerInfo.res' 'IDEExplorerITHVerInfo.RC'}
36 | {$R 'SplashScreenIcon.res' 'SplashScreenIcon.RC'}
37 |
38 | {$INCLUDE 'Source\CompilerDefinitions.inc'}
39 | {$INCLUDE 'Source\LibrarySuffixes.inc'}
40 |
41 | uses
42 | SysUtils,
43 | Classes,
44 | IDEExplorer.ExplorerForm in 'Source\IDEExplorer.ExplorerForm.pas' {DGHIDEExplorerForm},
45 | IDEExplorer.Wizard in 'Source\IDEExplorer.Wizard.pas',
46 | IDEExplorer.OLDRTTIFunctions in 'Source\IDEExplorer.OLDRTTIFunctions.pas',
47 | IDEExplorer.RTTIFunctions in 'Source\IDEExplorer.RTTIFunctions.pas',
48 | IDEExplorer.SplashScreen in 'Source\IDEExplorer.SplashScreen.pas',
49 | IDEExplorer.Functions in 'Source\IDEExplorer.Functions.pas',
50 | IDEExplorer.Types in 'Source\IDEExplorer.Types.pas',
51 | IDEExplorer.ResourceStrings in 'Source\IDEExplorer.ResourceStrings.pas',
52 | IDEExplorer.Constants in 'Source\IDEExplorer.Constants.pas',
53 | IDEExplorer.AboutBox in 'Source\IDEExplorer.AboutBox.pas',
54 | IDEExplorer.Interfaces in 'Source\IDEExplorer.Interfaces.pas',
55 | IDEExplorer.ProgressMgr in 'Source\IDEExplorer.ProgressMgr.pas',
56 | IDEExplorer.ProgressForm in 'Source\IDEExplorer.ProgressForm.pas' {frmDIEProgressForm};
57 |
58 | {$R *.res}
59 |
60 |
61 | Begin
62 | End.
63 |
--------------------------------------------------------------------------------
/IDEExplorer.ithelper:
--------------------------------------------------------------------------------
1 | [Setup]
2 | IncBuild=1
3 | CopyVersionInfoFrom=
4 | ExcludedResExts=.dcr
5 | EnabledVersionInfo=1
6 | IncludeInProject=1
7 | CompileWithBRCC32=0
8 | MajorVer=2
9 | MinorVer=4
10 | ReleaseVer=0
11 | BuildVer=709
12 | ResourceName=IDEExplorerITHVerInfo
13 | WarnBefore=0
14 | WarnAfter=0
15 | SaveModifiedFilesBeforeZipping=1
16 | IncBuild.Make.Release=1
17 | IncBuild.Build.Release=1
18 | IncBuild.Check.Release=0
19 | IncBuild.MakeUnit.Release=0
20 | IncBuild.Make.Base=1
21 | IncBuild.Build.Base=1
22 | IncBuild.Check.Base=0
23 | IncBuild.MakeUnit.Base=0
24 | IncBuild.Make.Debug=1
25 | IncBuild.Build.Debug=1
26 | IncBuild.Check.Debug=0
27 | IncBuild.MakeUnit.Debug=0
28 |
29 | [Zipping]
30 | Enabled=1
31 | ZipFile=D:\Documents\Web Page\Zips\IDEExplorer.zip
32 | BasePath=D:\Documents\RAD Studio\
33 | ExclusionFiles=
34 |
35 | [VersionInfo]
36 | CompanyName=Season's Fall Music
37 | FileDescription=IDEExplorer: A package to allow you to browser the internal fields, properties, methods and events of the IDE
38 | FileVersion=2.4.0.709
39 | InternalName=IDEExplorer
40 | LegalCopyright=Season's Fall Music
41 | LegalTrademarks=Season's Fall Music
42 | OriginalFilename=IDEExplorer
43 | ProductName=IDEExplorer
44 | ProductVersion=2.4
45 | Comments=IDEExplorer: A package to allow you to browser the internal fields, properties, methods and events of the IDE
46 |
47 |
--------------------------------------------------------------------------------
/IDEExplorer.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/IDEExplorer.res
--------------------------------------------------------------------------------
/IDEExplorerITHVerInfo.RC:
--------------------------------------------------------------------------------
1 | LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
2 |
3 | 1 VERSIONINFO LOADONCALL MOVEABLE DISCARDABLE IMPURE
4 | FILEVERSION 2, 3, 1, 709
5 | PRODUCTVERSION 2, 3, 1, 709
6 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
7 | FILEOS VOS__WINDOWS32
8 | FILETYPE VFT_APP
9 | {
10 | BLOCK "StringFileInfo"
11 | {
12 | BLOCK "040904E4"
13 | {
14 | VALUE "CompanyName", "Season's Fall Music\000"
15 | VALUE "FileDescription", "IDEExplorer: A package to allow you to browser the internal fields, properties, methods and events of the IDE\000"
16 | VALUE "FileVersion", "2.3.1.709\000"
17 | VALUE "InternalName", "IDEExplorer\000"
18 | VALUE "LegalCopyright", "Season's Fall Music\000"
19 | VALUE "LegalTrademarks", "Season's Fall Music\000"
20 | VALUE "OriginalFilename", "IDEExplorer\000"
21 | VALUE "ProductName", "IDEExplorer\000"
22 | VALUE "ProductVersion", "2.3a\000"
23 | VALUE "Comments", "IDEExplorer: A package to allow you to browser the internal fields, properties, methods and events of the IDE\000"
24 | }
25 | }
26 | BLOCK "VarFileInfo"
27 | {
28 | VALUE "Translation", 1033, 1252
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Icons/IDE Explorer 48x48 Icon.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/IDE Explorer 48x48 Icon.bmp
--------------------------------------------------------------------------------
/Icons/IDE Explorer.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/IDE Explorer.xcf
--------------------------------------------------------------------------------
/Icons/New IDE Explorer 24x24 Icon.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/New IDE Explorer 24x24 Icon.bmp
--------------------------------------------------------------------------------
/Icons/New IDE Explorer 48x48 Icon.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/New IDE Explorer 48x48 Icon.bmp
--------------------------------------------------------------------------------
/Icons/Splash Screen Icons.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/Splash Screen Icons.xcf
--------------------------------------------------------------------------------
/Icons/SplashScreenImage24x24.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/SplashScreenImage24x24.xcf
--------------------------------------------------------------------------------
/Icons/SplashScreenImage48x48.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Icons/SplashScreenImage48x48.xcf
--------------------------------------------------------------------------------
/Images/Char.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Char.bmp
--------------------------------------------------------------------------------
/Images/Dcu.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Dcu.ico
--------------------------------------------------------------------------------
/Images/Dfm.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Dfm.ico
--------------------------------------------------------------------------------
/Images/Dpk.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Dpk.ico
--------------------------------------------------------------------------------
/Images/Dpr.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Dpr.ico
--------------------------------------------------------------------------------
/Images/IDEExplorerInheritance.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerInheritance.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerNewEvents.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerNewEvents.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerNewFields.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerNewFields.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerNewHeirarchies.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerNewHeirarchies.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerNewMethods.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerNewMethods.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerNewProperties.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerNewProperties.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerOldProperties.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerOldProperties.gif
--------------------------------------------------------------------------------
/Images/IDEExplorerProperties.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/IDEExplorerProperties.gif
--------------------------------------------------------------------------------
/Images/MainIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/MainIcon.ico
--------------------------------------------------------------------------------
/Images/Pas.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/Pas.ico
--------------------------------------------------------------------------------
/Images/array.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/array.bmp
--------------------------------------------------------------------------------
/Images/class.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/class.bmp
--------------------------------------------------------------------------------
/Images/classref.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/classref.bmp
--------------------------------------------------------------------------------
/Images/dynarray.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/dynarray.bmp
--------------------------------------------------------------------------------
/Images/enum.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/enum.bmp
--------------------------------------------------------------------------------
/Images/float.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/float.bmp
--------------------------------------------------------------------------------
/Images/int64.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/int64.bmp
--------------------------------------------------------------------------------
/Images/integer.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/integer.bmp
--------------------------------------------------------------------------------
/Images/interface.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/interface.bmp
--------------------------------------------------------------------------------
/Images/lstring.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/lstring.bmp
--------------------------------------------------------------------------------
/Images/method.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/method.bmp
--------------------------------------------------------------------------------
/Images/pointer.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/pointer.bmp
--------------------------------------------------------------------------------
/Images/private.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/private.bmp
--------------------------------------------------------------------------------
/Images/procedure.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/procedure.bmp
--------------------------------------------------------------------------------
/Images/protected.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/protected.bmp
--------------------------------------------------------------------------------
/Images/public.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/public.bmp
--------------------------------------------------------------------------------
/Images/published.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/published.bmp
--------------------------------------------------------------------------------
/Images/record.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/record.bmp
--------------------------------------------------------------------------------
/Images/set.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/set.bmp
--------------------------------------------------------------------------------
/Images/string.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/string.bmp
--------------------------------------------------------------------------------
/Images/unknown.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/unknown.bmp
--------------------------------------------------------------------------------
/Images/ustring.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/ustring.bmp
--------------------------------------------------------------------------------
/Images/variant.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/variant.bmp
--------------------------------------------------------------------------------
/Images/wChar.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/wChar.bmp
--------------------------------------------------------------------------------
/Images/wstring.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/Images/wstring.bmp
--------------------------------------------------------------------------------
/License.md:
--------------------------------------------------------------------------------
1 | # IDE Explorer
2 |
3 | Author: David Hoyle (davidghoyle@gmail.com / [https://github.com/DGH2112](https://github.com/DGH2112))
4 |
5 | Version: 2.4
6 |
7 | Date: 04 Jan 2022
8 |
9 | ## GNU GENERAL PUBLIC LICENSE
10 |
11 | ### Version 3, 29 June 2007
12 |
13 | Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
14 |
15 | ### Preamble
16 |
17 | The GNU General Public License is a free, copyleft license for software and other kinds of works.
18 |
19 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
22 |
23 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
24 |
25 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
26 |
27 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
28 |
29 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
30 |
31 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
32 |
33 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
34 |
35 | The precise terms and conditions for copying, distribution and modification follow.
36 |
37 | ## TERMS AND CONDITIONS
38 |
39 | ### 0. Definitions
40 |
41 | "This License" refers to version 3 of the GNU General Public License.
42 |
43 | "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
44 |
45 | "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
46 |
47 | To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
48 |
49 | A "covered work" means either the unmodified Program or a work based on the Program.
50 |
51 | To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
52 |
53 | To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
54 |
55 | An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
56 |
57 | ### 1. Source Code
58 |
59 | The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
60 |
61 | A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
62 |
63 | The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
64 |
65 | The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
66 |
67 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
68 |
69 | The Corresponding Source for a work in source code form is that same work.
70 |
71 | ### 2. Basic Permissions
72 |
73 | All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
74 |
75 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
76 |
77 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
78 |
79 | ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
80 |
81 | No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
82 |
83 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
84 |
85 | ### 4. Conveying Verbatim Copies
86 |
87 | You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
88 |
89 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
90 |
91 | ### 5. Conveying Modified Source Versions
92 |
93 | You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
94 |
95 | a) The work must carry prominent notices stating that you modified
96 | it, and giving a relevant date.
97 |
98 | b) The work must carry prominent notices stating that it is
99 | released under this License and any conditions added under section
100 | 7. This requirement modifies the requirement in section 4 to
101 | "keep intact all notices".
102 |
103 | c) You must license the entire work, as a whole, under this
104 | License to anyone who comes into possession of a copy. This
105 | License will therefore apply, along with any applicable section 7
106 | additional terms, to the whole of the work, and all its parts,
107 | regardless of how they are packaged. This License gives no
108 | permission to license the work in any other way, but it does not
109 | invalidate such permission if you have separately received it.
110 |
111 | d) If the work has interactive user interfaces, each must display
112 | Appropriate Legal Notices; however, if the Program has interactive
113 | interfaces that do not display Appropriate Legal Notices, your
114 | work need not make them do so.
115 |
116 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
117 |
118 | ### 6. Conveying Non-Source Forms
119 |
120 | You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
121 |
122 | a) Convey the object code in, or embodied in, a physical product
123 | (including a physical distribution medium), accompanied by the
124 | Corresponding Source fixed on a durable physical medium
125 | customarily used for software interchange.
126 |
127 | b) Convey the object code in, or embodied in, a physical product
128 | (including a physical distribution medium), accompanied by a
129 | written offer, valid for at least three years and valid for as
130 | long as you offer spare parts or customer support for that product
131 | model, to give anyone who possesses the object code either (1) a
132 | copy of the Corresponding Source for all the software in the
133 | product that is covered by this License, on a durable physical
134 | medium customarily used for software interchange, for a price no
135 | more than your reasonable cost of physically performing this
136 | conveying of source, or (2) access to copy the
137 | Corresponding Source from a network server at no charge.
138 |
139 | c) Convey individual copies of the object code with a copy of the
140 | written offer to provide the Corresponding Source. This
141 | alternative is allowed only occasionally and noncommercially, and
142 | only if you received the object code with such an offer, in accord
143 | with subsection 6b.
144 |
145 | d) Convey the object code by offering access from a designated
146 | place (gratis or for a charge), and offer equivalent access to the
147 | Corresponding Source in the same way through the same place at no
148 | further charge. You need not require recipients to copy the
149 | Corresponding Source along with the object code. If the place to
150 | copy the object code is a network server, the Corresponding Source
151 | may be on a different server (operated by you or a third party)
152 | that supports equivalent copying facilities, provided you maintain
153 | clear directions next to the object code saying where to find the
154 | Corresponding Source. Regardless of what server hosts the
155 | Corresponding Source, you remain obligated to ensure that it is
156 | available for as long as needed to satisfy these requirements.
157 |
158 | e) Convey the object code using peer-to-peer transmission, provided
159 | you inform other peers where the object code and Corresponding
160 | Source of the work are being offered to the general public at no
161 | charge under subsection 6d.
162 |
163 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
164 |
165 | A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
166 |
167 | "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
168 |
169 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
170 |
171 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
172 |
173 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
174 |
175 | ### 7. Additional Terms
176 |
177 | "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
178 |
179 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
180 |
181 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
182 |
183 | a) Disclaiming warranty or limiting liability differently from the
184 | terms of sections 15 and 16 of this License; or
185 |
186 | b) Requiring preservation of specified reasonable legal notices or
187 | author attributions in that material or in the Appropriate Legal
188 | Notices displayed by works containing it; or
189 |
190 | c) Prohibiting misrepresentation of the origin of that material, or
191 | requiring that modified versions of such material be marked in
192 | reasonable ways as different from the original version; or
193 |
194 | d) Limiting the use for publicity purposes of names of licensors or
195 | authors of the material; or
196 |
197 | e) Declining to grant rights under trademark law for use of some
198 | trade names, trademarks, or service marks; or
199 |
200 | f) Requiring indemnification of licensors and authors of that
201 | material by anyone who conveys the material (or modified versions of
202 | it) with contractual assumptions of liability to the recipient, for
203 | any liability that these contractual assumptions directly impose on
204 | those licensors and authors.
205 |
206 | All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
207 |
208 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
209 |
210 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
211 |
212 | ### 8. Termination
213 |
214 | You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
215 |
216 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
217 |
218 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
219 |
220 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
221 |
222 | ### 9. Acceptance Not Required for Having Copies
223 |
224 | You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
225 |
226 | ### 10. Automatic Licensing of Downstream Recipients
227 |
228 | Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
229 |
230 | An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
231 |
232 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
233 |
234 | ### 11. Patents
235 |
236 | A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
237 |
238 | A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
239 |
240 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
241 |
242 | In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
243 |
244 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
245 |
246 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
247 |
248 | A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
249 |
250 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
251 |
252 | ### 12. No Surrender of Others' Freedom
253 |
254 | If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
255 |
256 | ### 13. Use with the GNU Affero General Public License
257 |
258 | Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work,but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
259 |
260 | ### 14. Revised Versions of this License
261 |
262 | The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
263 |
264 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
265 |
266 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
267 |
268 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
269 |
270 | ### 15. Disclaimer of Warranty
271 |
272 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
273 |
274 | ### 16. Limitation of Liability
275 |
276 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
277 |
278 | ### 17. Interpretation of Sections 15 and 16
279 |
280 | If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
281 |
282 | ## END OF TERMS AND CONDITIONS
283 |
284 | How to Apply These Terms to Your New Programs
285 |
286 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
289 |
290 |
291 | Copyright (C)
292 |
293 | This program is free software: you can redistribute it and/or modify
294 | it under the terms of the GNU General Public License as published by
295 | the Free Software Foundation, either version 3 of the License, or
296 | (at your option) any later version.
297 |
298 | This program is distributed in the hope that it will be useful,
299 | but WITHOUT ANY WARRANTY; without even the implied warranty of
300 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
301 | GNU General Public License for more details.
302 |
303 | You should have received a copy of the GNU General Public License
304 | along with this program. If not, see .
305 |
306 | Also add information on how to contact you by electronic and paper mail.
307 |
308 | If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
309 |
310 | Copyright (C)
311 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
312 | This is free software, and you are welcome to redistribute it
313 | under certain conditions; type `show c' for details.
314 |
315 | The hypothetical commands `show w` and `show c` should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".
316 |
317 | You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see .
318 |
319 | The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .
320 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IDE Explorer
2 |
3 | Author: David Hoyle (davidghoyle@gmail.com / [https://github.com/DGH2112](https://github.com/DGH2112))
4 |
5 | Version: 2.4
6 |
7 | Date: 04 Jan 2022
8 |
9 | ## Overview
10 |
11 | This is a RAD Studio wizard / expert / plug-in which allows you to browse the fields, methods, properties and events of the internal elements of the IDE (forms and components as of now but possibly classes in the future).
12 |
13 | ## Usage
14 |
15 | IDE Explorer can be accessed from the main IDE Help menu (since Delphi 10.0 Seattle there is a "Help Wizards" sub-menu)
16 |
17 | ## Current Limitations
18 |
19 | Current this expert only runs once at start-up so any new windows created after
20 | this point will not be adjusted however you can manually run the expert as described above.
21 |
22 | ## Source Code and Binaries
23 |
24 | Please note that this project has changed from a BPL to a DLL to make maintenance of multiple version for different IDEs easier (single project for all versions).
25 |
26 | You can download a binary of this project if you don't want to compile it yourself from the web page above.
27 |
28 | ## Miscellaneous
29 |
30 | You can install [Delphinus package manager](https://github.com/Memnarch/Delphinus/wiki/Installing-Delphinus) and then install IDE Explorer there. (Delphinus-Support)
31 |
--------------------------------------------------------------------------------
/Source/CompilerDefinitions.inc:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | An include unit to define compiler definitions for versions of Delphi. If the
4 | definition exists it means that that version of the compiler or high is
5 | available.
6 |
7 | @Version 1.217
8 | @Date 04 Jan 2022
9 | @Author David Hoyle
10 |
11 | @license
12 |
13 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
14 | browse the internals of the RAD Studio IDE.
15 |
16 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
17 |
18 | This program is free software: you can redistribute it and/or modify
19 | it under the terms of the GNU General Public License as published by
20 | the Free Software Foundation, either version 3 of the License, or
21 | (at your option) any later version.
22 |
23 | This program is distributed in the hope that it will be useful,
24 | but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | GNU General Public License for more details.
27 |
28 | You should have received a copy of the GNU General Public License
29 | along with this program. If not, see .
30 |
31 | **)
32 |
33 | // Borland Delphi 1, Version 1
34 | {$IFDEF VER80}
35 | {$DEFINE D0001}
36 | {$ENDIF}
37 |
38 | // Borland Delphi 2, Version 2
39 | {$IFDEF VER90}
40 | {$DEFINE D0001}
41 | {$DEFINE D0002}
42 | {$ENDIF}
43 |
44 | // Borland C++ Builder update
45 | {$IFDEF VER93}
46 | {$DEFINE D0001}
47 | {$DEFINE D0002}
48 | {$ENDIF}
49 |
50 | // Borland Delphi 3, Version 3
51 | {$IFDEF VER100}
52 | {$DEFINE D0001}
53 | {$DEFINE D0002}
54 | {$DEFINE D0003}
55 | {$ENDIF}
56 |
57 | // Borland C++ Builder Update, Version 3
58 | {$IFDEF VER110}
59 | {$DEFINE D0001}
60 | {$DEFINE D0002}
61 | {$DEFINE D0003}
62 | {$ENDIF}
63 |
64 | // Borland Delphi 4, Version 4
65 | {$IFDEF VER120}
66 | {$DEFINE D0001}
67 | {$DEFINE D0002}
68 | {$DEFINE D0003}
69 | {$DEFINE D0004}
70 | {$ENDIF}
71 |
72 | // Borland C++ Builder Update, Version 4
73 | {$IFDEF VER125}
74 | {$DEFINE D0001}
75 | {$DEFINE D0002}
76 | {$DEFINE D0003}
77 | {$DEFINE D0004}
78 | {$ENDIF}
79 |
80 | // Borland Delphi 5, Version 5, Package version 50
81 | {$IFDEF VER130}
82 | {$DEFINE D0001}
83 | {$DEFINE D0002}
84 | {$DEFINE D0003}
85 | {$DEFINE D0004}
86 | {$DEFINE D0005}
87 | {$ENDIF}
88 |
89 | // Borland Delphi 6, Version 6, Package version 60
90 | {$IFDEF VER140}
91 | {$DEFINE D0001}
92 | {$DEFINE D0002}
93 | {$DEFINE D0003}
94 | {$DEFINE D0004}
95 | {$DEFINE D0005}
96 | {$DEFINE D0006}
97 | {$ENDIF}
98 |
99 | // Borland Delphi 7 & 7.1, Version 7, Package version 70
100 | {$IFDEF VER150}
101 | {$DEFINE D0001}
102 | {$DEFINE D0002}
103 | {$DEFINE D0003}
104 | {$DEFINE D0004}
105 | {$DEFINE D0005}
106 | {$DEFINE D0006}
107 | {$DEFINE D0007}
108 | {$ENDIF}
109 |
110 | // Borland Delphi 8 for .NET, Version 8, Package version 80
111 | {$IFDEF VER160}
112 | {$DEFINE D0001}
113 | {$DEFINE D0002}
114 | {$DEFINE D0003}
115 | {$DEFINE D0004}
116 | {$DEFINE D0005}
117 | {$DEFINE D0006}
118 | {$DEFINE D0007}
119 | {$DEFINE D0008}
120 | {$ENDIF}
121 |
122 | // Borland Delphi 2005 (BDS 3.0?), Version 9, Package version 90
123 | {$IFDEF VER170}
124 | {$DEFINE D0001}
125 | {$DEFINE D0002}
126 | {$DEFINE D0003}
127 | {$DEFINE D0004}
128 | {$DEFINE D0005}
129 | {$DEFINE D0006}
130 | {$DEFINE D0007}
131 | {$DEFINE D0008}
132 | {$DEFINE D2005}
133 | {$ENDIF}
134 |
135 | // Borland Delphi 2006 (BDS 4.0), Version 10, Package version 100
136 | {$IFDEF VER180}
137 | {$DEFINE D0001}
138 | {$DEFINE D0002}
139 | {$DEFINE D0003}
140 | {$DEFINE D0004}
141 | {$DEFINE D0005}
142 | {$DEFINE D0006}
143 | {$DEFINE D0007}
144 | {$DEFINE D0008}
145 | {$DEFINE D2005}
146 | {$DEFINE D2006}
147 | {$ENDIF}
148 |
149 | // CodeGear Delphi 2007 (RAD Studio 5.0), Version 11, Package version 110
150 | {$IFDEF VER185}
151 | {$DEFINE D0001}
152 | {$DEFINE D0002}
153 | {$DEFINE D0003}
154 | {$DEFINE D0004}
155 | {$DEFINE D0005}
156 | {$DEFINE D0006}
157 | {$DEFINE D0007}
158 | {$DEFINE D0008}
159 | {$DEFINE D2005}
160 | {$DEFINE D2006}
161 | {$DEFINE D2007}
162 | {$ENDIF}
163 |
164 | // CodeGear Delphi 2007 for .NET (RAD Studio 5.0), Version 11, Package version 110
165 | {$IFDEF VER190}
166 | {$DEFINE D0001}
167 | {$DEFINE D0002}
168 | {$DEFINE D0003}
169 | {$DEFINE D0004}
170 | {$DEFINE D0005}
171 | {$DEFINE D0006}
172 | {$DEFINE D0007}
173 | {$DEFINE D0008}
174 | {$DEFINE D2005}
175 | {$DEFINE D2006}
176 | {$DEFINE D2007}
177 | {$ENDIF}
178 |
179 | // CodeGear Delphi 2009 (RAD Studio 6.0), Version 12, Package version 12
180 | {$IFDEF VER200}
181 | {$DEFINE D0001}
182 | {$DEFINE D0002}
183 | {$DEFINE D0003}
184 | {$DEFINE D0004}
185 | {$DEFINE D0005}
186 | {$DEFINE D0006}
187 | {$DEFINE D0007}
188 | {$DEFINE D0008}
189 | {$DEFINE D2005}
190 | {$DEFINE D2006}
191 | {$DEFINE D2007}
192 | {$DEFINE D2009}
193 | {$ENDIF}
194 |
195 | // Embarcadero Delphi 2010 (RAD Studio 7.0), Version 14, Package version 140
196 | {$IFDEF VER210}
197 | {$DEFINE D0001}
198 | {$DEFINE D0002}
199 | {$DEFINE D0003}
200 | {$DEFINE D0004}
201 | {$DEFINE D0005}
202 | {$DEFINE D0006}
203 | {$DEFINE D0007}
204 | {$DEFINE D0008}
205 | {$DEFINE D2005}
206 | {$DEFINE D2006}
207 | {$DEFINE D2007}
208 | {$DEFINE D2009}
209 | {$DEFINE D2010}
210 | {$ENDIF}
211 |
212 | // Embarcadero Delphi XE (RAD Studio 8.0), Version 15, Package version 15
213 | {$IFDEF VER220}
214 | {$DEFINE D0001}
215 | {$DEFINE D0002}
216 | {$DEFINE D0003}
217 | {$DEFINE D0004}
218 | {$DEFINE D0005}
219 | {$DEFINE D0006}
220 | {$DEFINE D0007}
221 | {$DEFINE D0008}
222 | {$DEFINE D2005}
223 | {$DEFINE D2006}
224 | {$DEFINE D2007}
225 | {$DEFINE D2009}
226 | {$DEFINE D2010}
227 | {$DEFINE DXE00}
228 | {$ENDIF}
229 |
230 | // Embarcadero Delphi XE2 (RAD Studio 9.0), Version 16, Package version 160
231 | {$IFDEF VER230} // 161 is the version for the five FireMonkey packages at XE2 Update 2
232 | {$DEFINE D0001}
233 | {$DEFINE D0002}
234 | {$DEFINE D0003}
235 | {$DEFINE D0004}
236 | {$DEFINE D0005}
237 | {$DEFINE D0006}
238 | {$DEFINE D0007}
239 | {$DEFINE D0008}
240 | {$DEFINE D2005}
241 | {$DEFINE D2006}
242 | {$DEFINE D2007}
243 | {$DEFINE D2009}
244 | {$DEFINE D2010}
245 | {$DEFINE DXE00}
246 | {$DEFINE DXE20}
247 | {$ENDIF}
248 |
249 | // Embarcadero Delphi XE3 (RAD Studio 10.0), Version 17, Package version 170
250 | {$IFDEF VER240}
251 | {$DEFINE D0001}
252 | {$DEFINE D0002}
253 | {$DEFINE D0003}
254 | {$DEFINE D0004}
255 | {$DEFINE D0005}
256 | {$DEFINE D0006}
257 | {$DEFINE D0007}
258 | {$DEFINE D0008}
259 | {$DEFINE D2005}
260 | {$DEFINE D2006}
261 | {$DEFINE D2007}
262 | {$DEFINE D2009}
263 | {$DEFINE D2010}
264 | {$DEFINE DXE00}
265 | {$DEFINE DXE20}
266 | {$DEFINE DXE30}
267 | {$ENDIF}
268 |
269 | // Embarcadero Delphi XE4 (RAD Studio 11.0), Version 18, Package version 180
270 | {$IFDEF VER250}
271 | {$DEFINE D0001}
272 | {$DEFINE D0002}
273 | {$DEFINE D0003}
274 | {$DEFINE D0004}
275 | {$DEFINE D0005}
276 | {$DEFINE D0006}
277 | {$DEFINE D0007}
278 | {$DEFINE D0008}
279 | {$DEFINE D2005}
280 | {$DEFINE D2006}
281 | {$DEFINE D2007}
282 | {$DEFINE D2009}
283 | {$DEFINE D2010}
284 | {$DEFINE DXE00}
285 | {$DEFINE DXE20}
286 | {$DEFINE DXE30}
287 | {$DEFINE DXE40}
288 | {$ENDIF}
289 |
290 | // Embarcadero Delphi XE5 (RAD Studio 12.0), Version 19, Package version 190
291 | {$IFDEF VER260}
292 | {$DEFINE D0001}
293 | {$DEFINE D0002}
294 | {$DEFINE D0003}
295 | {$DEFINE D0004}
296 | {$DEFINE D0005}
297 | {$DEFINE D0006}
298 | {$DEFINE D0007}
299 | {$DEFINE D0008}
300 | {$DEFINE D2005}
301 | {$DEFINE D2006}
302 | {$DEFINE D2007}
303 | {$DEFINE D2009}
304 | {$DEFINE D2010}
305 | {$DEFINE DXE00}
306 | {$DEFINE DXE20}
307 | {$DEFINE DXE30}
308 | {$DEFINE DXE40}
309 | {$DEFINE DXE50}
310 | {$ENDIF}
311 |
312 | // Embarcadero Delphi XE6 (RAD Studio 14.0), Version 20, Package version 200
313 | {$IFDEF VER270}
314 | {$DEFINE D0001}
315 | {$DEFINE D0002}
316 | {$DEFINE D0003}
317 | {$DEFINE D0004}
318 | {$DEFINE D0005}
319 | {$DEFINE D0006}
320 | {$DEFINE D0007}
321 | {$DEFINE D0008}
322 | {$DEFINE D2005}
323 | {$DEFINE D2006}
324 | {$DEFINE D2007}
325 | {$DEFINE D2009}
326 | {$DEFINE D2010}
327 | {$DEFINE DXE00}
328 | {$DEFINE DXE20}
329 | {$DEFINE DXE30}
330 | {$DEFINE DXE40}
331 | {$DEFINE DXE50}
332 | {$DEFINE DXE60}
333 | {$ENDIF}
334 |
335 | // Embarcadero Delphi XE7 (Studio 15.0), Version 21, Package version 210
336 | {$IFDEF VER280}
337 | {$DEFINE D0001}
338 | {$DEFINE D0002}
339 | {$DEFINE D0003}
340 | {$DEFINE D0004}
341 | {$DEFINE D0005}
342 | {$DEFINE D0006}
343 | {$DEFINE D0007}
344 | {$DEFINE D0008}
345 | {$DEFINE D2005}
346 | {$DEFINE D2006}
347 | {$DEFINE D2007}
348 | {$DEFINE D2009}
349 | {$DEFINE D2010}
350 | {$DEFINE DXE00}
351 | {$DEFINE DXE20}
352 | {$DEFINE DXE30}
353 | {$DEFINE DXE40}
354 | {$DEFINE DXE50}
355 | {$DEFINE DXE60}
356 | {$DEFINE DXE70}
357 | {$ENDIF}
358 |
359 | // Embarcadero Delphi XE8 (Studio 16.0), Version 22, Package version 220
360 | {$IFDEF VER290}
361 | {$DEFINE D0001}
362 | {$DEFINE D0002}
363 | {$DEFINE D0003}
364 | {$DEFINE D0004}
365 | {$DEFINE D0005}
366 | {$DEFINE D0006}
367 | {$DEFINE D0007}
368 | {$DEFINE D0008}
369 | {$DEFINE D2005}
370 | {$DEFINE D2006}
371 | {$DEFINE D2007}
372 | {$DEFINE D2009}
373 | {$DEFINE D2010}
374 | {$DEFINE DXE00}
375 | {$DEFINE DXE20}
376 | {$DEFINE DXE30}
377 | {$DEFINE DXE40}
378 | {$DEFINE DXE50}
379 | {$DEFINE DXE60}
380 | {$DEFINE DXE70}
381 | {$DEFINE DXE80}
382 | {$ENDIF}
383 |
384 | // Embarcadero Delphi XE10 Seattle (Studio 17.0), Version 23, Package version 230
385 | {$IFDEF VER300}
386 | {$DEFINE D0001}
387 | {$DEFINE D0002}
388 | {$DEFINE D0003}
389 | {$DEFINE D0004}
390 | {$DEFINE D0005}
391 | {$DEFINE D0006}
392 | {$DEFINE D0007}
393 | {$DEFINE D0008}
394 | {$DEFINE D2005}
395 | {$DEFINE D2006}
396 | {$DEFINE D2007}
397 | {$DEFINE D2009}
398 | {$DEFINE D2010}
399 | {$DEFINE DXE00}
400 | {$DEFINE DXE20}
401 | {$DEFINE DXE30}
402 | {$DEFINE DXE40}
403 | {$DEFINE DXE50}
404 | {$DEFINE DXE60}
405 | {$DEFINE DXE70}
406 | {$DEFINE DXE80}
407 | {$DEFINE RS100}
408 | {$ENDIF}
409 |
410 | // Embarcadero Delphi XE10.1 Berlin (Studio 18.0), Version 24, Package version 240
411 | {$IFDEF VER310}
412 | {$DEFINE D0001}
413 | {$DEFINE D0002}
414 | {$DEFINE D0003}
415 | {$DEFINE D0004}
416 | {$DEFINE D0005}
417 | {$DEFINE D0006}
418 | {$DEFINE D0007}
419 | {$DEFINE D0008}
420 | {$DEFINE D2005}
421 | {$DEFINE D2006}
422 | {$DEFINE D2007}
423 | {$DEFINE D2009}
424 | {$DEFINE D2010}
425 | {$DEFINE DXE00}
426 | {$DEFINE DXE20}
427 | {$DEFINE DXE30}
428 | {$DEFINE DXE40}
429 | {$DEFINE DXE50}
430 | {$DEFINE DXE60}
431 | {$DEFINE DXE70}
432 | {$DEFINE DXE80}
433 | {$DEFINE RS100}
434 | {$DEFINE RS101}
435 | {$ENDIF}
436 |
437 | // Embarcadero Delphi XE10.2 Tokyo (Studio 19.0), Version 25, Package version 250
438 | {$IFDEF VER320}
439 | {$DEFINE D0001}
440 | {$DEFINE D0002}
441 | {$DEFINE D0003}
442 | {$DEFINE D0004}
443 | {$DEFINE D0005}
444 | {$DEFINE D0006}
445 | {$DEFINE D0007}
446 | {$DEFINE D0008}
447 | {$DEFINE D2005}
448 | {$DEFINE D2006}
449 | {$DEFINE D2007}
450 | {$DEFINE D2009}
451 | {$DEFINE D2010}
452 | {$DEFINE DXE00}
453 | {$DEFINE DXE20}
454 | {$DEFINE DXE30}
455 | {$DEFINE DXE40}
456 | {$DEFINE DXE50}
457 | {$DEFINE DXE60}
458 | {$DEFINE DXE70}
459 | {$DEFINE DXE80}
460 | {$DEFINE RS100}
461 | {$DEFINE RS101}
462 | {$DEFINE RS102}
463 | {$ENDIF}
464 |
465 | // Embarcadero Delphi XE10.3 Rio (Studio 20.0), Version 26, Package version 260
466 | {$IFDEF VER330}
467 | {$DEFINE D0001}
468 | {$DEFINE D0002}
469 | {$DEFINE D0003}
470 | {$DEFINE D0004}
471 | {$DEFINE D0005}
472 | {$DEFINE D0006}
473 | {$DEFINE D0007}
474 | {$DEFINE D0008}
475 | {$DEFINE D2005}
476 | {$DEFINE D2006}
477 | {$DEFINE D2007}
478 | {$DEFINE D2009}
479 | {$DEFINE D2010}
480 | {$DEFINE DXE00}
481 | {$DEFINE DXE20}
482 | {$DEFINE DXE30}
483 | {$DEFINE DXE40}
484 | {$DEFINE DXE50}
485 | {$DEFINE DXE60}
486 | {$DEFINE DXE70}
487 | {$DEFINE DXE80}
488 | {$DEFINE RS100}
489 | {$DEFINE RS101}
490 | {$DEFINE RS102}
491 | {$DEFINE RS103}
492 | {$ENDIF}
493 |
494 | // Embarcadero Delphi XE10.4 Sydney (Studio 21.0), Version 27, Package version 270
495 | {$IFDEF VER340}
496 | {$DEFINE D0001}
497 | {$DEFINE D0002}
498 | {$DEFINE D0003}
499 | {$DEFINE D0004}
500 | {$DEFINE D0005}
501 | {$DEFINE D0006}
502 | {$DEFINE D0007}
503 | {$DEFINE D0008}
504 | {$DEFINE D2005}
505 | {$DEFINE D2006}
506 | {$DEFINE D2007}
507 | {$DEFINE D2009}
508 | {$DEFINE D2010}
509 | {$DEFINE DXE00}
510 | {$DEFINE DXE20}
511 | {$DEFINE DXE30}
512 | {$DEFINE DXE40}
513 | {$DEFINE DXE50}
514 | {$DEFINE DXE60}
515 | {$DEFINE DXE70}
516 | {$DEFINE DXE80}
517 | {$DEFINE RS100}
518 | {$DEFINE RS101}
519 | {$DEFINE RS102}
520 | {$DEFINE RS103}
521 | {$DEFINE RS104}
522 | {$ENDIF}
523 |
524 | // Embarcadero Delphi 11.0 Alexandria (Studio 22.0), Version 28, Package version 280
525 | {$IFDEF VER350}
526 | {$DEFINE D0001}
527 | {$DEFINE D0002}
528 | {$DEFINE D0003}
529 | {$DEFINE D0004}
530 | {$DEFINE D0005}
531 | {$DEFINE D0006}
532 | {$DEFINE D0007}
533 | {$DEFINE D0008}
534 | {$DEFINE D2005}
535 | {$DEFINE D2006}
536 | {$DEFINE D2007}
537 | {$DEFINE D2009}
538 | {$DEFINE D2010}
539 | {$DEFINE DXE00}
540 | {$DEFINE DXE20}
541 | {$DEFINE DXE30}
542 | {$DEFINE DXE40}
543 | {$DEFINE DXE50}
544 | {$DEFINE DXE60}
545 | {$DEFINE DXE70}
546 | {$DEFINE DXE80}
547 | {$DEFINE RS100}
548 | {$DEFINE RS101}
549 | {$DEFINE RS102}
550 | {$DEFINE RS103}
551 | {$DEFINE RS104}
552 | {$DEFINE RS110}
553 | {$ENDIF}
554 |
555 | {$IFNDEF D0001}
556 | {$MESSAGE ERROR 'The Condition Definitions need to be updated!!!!!'}
557 | {$ENDIF}
558 |
559 |
560 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.AboutBox.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains methods to adding and removing the About Box Entry in the IDEs about dialogue.
4 |
5 | @Author David Hoyle
6 | @Version 1.213
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.AboutBox;
31 |
32 | Interface
33 |
34 | Function AddAboutBoxEntry : Integer;
35 | Procedure RemoveAboutBoxEntry(Const iIndex : Integer);
36 |
37 | Implementation
38 |
39 | {$INCLUDE CompilerDefinitions.inc}
40 |
41 | Uses
42 | ToolsAPI,
43 | SysUtils,
44 | DateUtils,
45 | Forms,
46 | {$IFDEF RS110}
47 | Graphics,
48 | {$ELSE}
49 | Windows,
50 | {$ENDIF RS110}
51 | IDEExplorer.Types,
52 | IDEExplorer.Functions,
53 | IDEExplorer.Constants,
54 | IDEExplorer.ResourceStrings;
55 |
56 | (**
57 |
58 | This method adds an about box entry to the IDEs about dialogue.
59 |
60 | @precon None.
61 | @postcon The integer returned is the index of the entry and should be used remove the entry from the
62 | IDE.
63 |
64 | @return an Integer
65 |
66 | **)
67 | Function AddAboutBoxEntry : Integer;
68 |
69 | Const
70 | strIDEExplorerSplashScreenBitMap = 'IDEExplorerSplashScreenBitMap48x48';
71 |
72 | ResourceString
73 | strSKUBuild = 'SKU Build %d.%d.%d.%d';
74 | strExpertsDescription = 'An RAD Studio IDE Expert to allow you to browse the IDE''s published ' +
75 | 'elements.';
76 |
77 | Var
78 | {$IFDEF RS110}
79 | AboutBoxBitMap : TBitMap;
80 | {$ELSE}
81 | bmAboutBox : HBITMAP;
82 | {$ENDIF RS110}
83 | VerInfo : TVersionInfo;
84 | ABS : IOTAAboutBoxServices;
85 |
86 | Begin
87 | Result := -1;
88 | BuildNumber(VerInfo);
89 | If Supports(BorlandIDEServices, IOTAAboutBoxServices, ABS) Then
90 | Begin
91 | {$IFDEF RS110}
92 | AboutBoxBitMap := TBitMap.Create;
93 | Try
94 | AboutBoxBitMap.LoadFromResourceName(hInstance, strIDEExplorerSplashScreenBitMap);
95 | Result := ABS.AddPluginInfo(
96 | Format(strSplashScreenName, [VerInfo.iMajor, VerInfo.iMinor, Copy(strRevision, VerInfo.iBugFix + 1, 1), Application.Title]),
97 | strExpertsDescription,
98 | [AboutBoxBitMap],
99 | {$IFDEF DEBUG} True {$ELSE} False {$ENDIF},
100 | Format(strSplashScreenBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild]),
101 | Format(strSKUBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild])
102 | );
103 | Finally
104 | AboutBoxBitMap.Free;
105 | End;
106 | {$ELSE}
107 | bmAboutBox := LoadBitmap(hInstance, strIDEExplorerSplashScreenBitMap);
108 | Result := ABS.AddPluginInfo(
109 | Format(strSplashScreenName, [VerInfo.iMajor, VerInfo.iMinor, Copy(strRevision, VerInfo.iBugFix + 1, 1), Application.Title]),
110 | strExpertsDescription,
111 | bmAboutBox,
112 | {$IFDEF DEBUG} True {$ELSE} False {$ENDIF},
113 | Format(strSplashScreenBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild]),
114 | Format(strSKUBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild])
115 | );
116 | {$ENDIF RS110}
117 | End;
118 | End;
119 |
120 | (**
121 |
122 | This method removed the indexed about box entry from the IDE.
123 |
124 | @precon None.
125 | @postcon If the given index is greater than -1 the entry is removed from the IDE.
126 |
127 | @param iIndex as an Integer as a constant
128 |
129 | **)
130 | Procedure RemoveAboutBoxEntry(Const iIndex : Integer);
131 |
132 | Var
133 | ABS : IOTAAboutBoxServices;
134 |
135 | Begin
136 | If Supports(BorlandIDEServices, IOTAAboutBoxServices, ABS) Then
137 | If iIndex > -1 Then
138 | ABS.RemovePluginInfo(iIndex);
139 | End;
140 |
141 | End.
142 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.Constants.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains constants to be used throughout the plug-in.
4 |
5 | @Author David Hoyle
6 | @Version 1.093
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.Constants;
31 |
32 | Interface
33 |
34 | Const
35 | (** A constant to define the build bug fix letters. **)
36 | strRevision: String = ' abcdefghijklmnopqrstuvwxyz';
37 |
38 | Implementation
39 |
40 | End.
41 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.ExplorerForm.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains the explorer form interface.
4 |
5 | @Date 04 Jan 2022
6 | @Version 6.616
7 | @Author David Hoyle
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.ExplorerForm;
31 |
32 | Interface
33 |
34 | Uses
35 | Windows,
36 | Messages,
37 | SysUtils,
38 | Classes,
39 | Graphics,
40 | Controls,
41 | Forms,
42 | Dialogs,
43 | ComCtrls,
44 | ExtCtrls,
45 | ImgList,
46 | Vcl.StdCtrls,
47 | VirtualTrees,
48 | IDEExplorer.Interfaces;
49 |
50 | {$INCLUDE CompilerDefinitions.inc}
51 |
52 | Type
53 | (** This class represent a form for displaying the internal published elements of the IDE. **)
54 | TDGHIDEExplorerForm = Class(TForm)
55 | ilTreeImages: TImageList;
56 | splSplitter1: TSplitter;
57 | ilTypeKindImages: TImageList;
58 | pgcPropertiesMethodsAndEvents: TPageControl;
59 | tabOLDProperties: TTabSheet;
60 | tabHierarchies: TTabSheet;
61 | tabNewProperties: TTabSheet;
62 | tabFields: TTabSheet;
63 | tabEvents: TTabSheet;
64 | tabMethods: TTabSheet;
65 | ilScope: TImageList;
66 | vstComponentTree: TVirtualStringTree;
67 | pnlTreePanel: TPanel;
68 | edtComponentFilter: TEdit;
69 | tmFilterTimer: TTimer;
70 | vstFields: TVirtualStringTree;
71 | vstMethods: TVirtualStringTree;
72 | vstProperties: TVirtualStringTree;
73 | vstEvents: TVirtualStringTree;
74 | vstHierarchies: TVirtualStringTree;
75 | vstOLDProperties: TVirtualStringTree;
76 | pnlPME: TPanel;
77 | edtPropertyFilter: TEdit;
78 | Procedure BuildFormComponentTree(Sender: TObject);
79 | procedure edtComponentFilterChange(Sender: TObject);
80 | procedure edtPropertyFilterChange(Sender: TObject);
81 | procedure FormCreate(Sender: TObject);
82 | procedure FormDestroy(Sender: TObject);
83 | procedure FormShow(Sender: TObject);
84 | procedure tmFilterTimerTimer(Sender: TObject);
85 | procedure vstComponentTreeCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column:
86 | TColumnIndex; var Result: Integer);
87 | procedure vstComponentTreeFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
88 | TColumnIndex);
89 | procedure vstComponentTreeFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
90 | procedure vstComponentTreeGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
91 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
92 | procedure vstComponentTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
93 | TextType: TVSTTextType; var CellText: string);
94 | procedure vstFieldsDblClick(Sender: TObject);
95 | procedure vstFieldsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
96 | procedure vstFieldsGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
97 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
98 | procedure vstFieldsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType:
99 | TVSTTextType; var CellText: string);
100 | procedure vstHierarchiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
101 | procedure vstHierarchiesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
102 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
103 | procedure vstHierarchiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
104 | TextType: TVSTTextType; var CellText: string);
105 | procedure vstMethodsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
106 | procedure vstMethodsGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
107 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
108 | procedure vstMethodsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
109 | TextType: TVSTTextType; var CellText: string);
110 | procedure vstOLDPropertiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
111 | procedure vstOLDPropertiesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind:
112 | TVTImageKind; Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
113 | procedure vstOLDPropertiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
114 | TextType: TVSTTextType; var CellText: string);
115 | procedure vstPropertiesDblClick(Sender: TObject);
116 | procedure vstPropertiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
117 | procedure vstPropertiesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
118 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
119 | procedure vstPropertiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
120 | TextType: TVSTTextType; var CellText: string);
121 | Strict Private
122 | FProgressMgr : IDIEProgressMgr;
123 | FLastComponentFilterUpdate : Cardinal;
124 | FLastViewFilterUpdate : Cardinal;
125 | Strict Protected
126 | Procedure GetComponents(Const Node: PVirtualNode; Const Component: TComponent);
127 | Procedure LoadSettings;
128 | Procedure SaveSettings;
129 | Procedure BuildComponentHeritage(Const Node : PVirtualNode);
130 | Procedure BuildParentHeritage(Const Node : PVirtualNode);
131 | Procedure FilterComponents;
132 | procedure FilterView(const vstView: TVirtualStringTree; const iColumnIndex: Integer);
133 | Public
134 | Class Procedure Execute;
135 | End;
136 |
137 | Implementation
138 |
139 | {$R *.DFM}
140 |
141 |
142 | Uses
143 | {$IFDEF DEBUG}
144 | CodeSiteLogging,
145 | {$ENDIF DEBUG}
146 | TypInfo,
147 | ToolsAPI,
148 | Registry,
149 | RegularExpressions,
150 | RegularExpressionsCore,
151 | IDEExplorer.RTTIFunctions,
152 | IDEExplorer.OLDRTTIFunctions,
153 | IDEExplorer.ProgressMgr, IDEExplorer.Types;
154 |
155 | Type
156 | (** An enumerate to define the tree images. **)
157 | TIDEExplorerTreeImage = (tiApplication, tiDataModule, tiForm, tiPackage, tiForms, tiDataModules);
158 |
159 | Const
160 | (** This is the root registration key for this applications settings. **)
161 | RegKey = '\Software\Seasons Fall';
162 | (** This is the section name for the applications settings in the registry **)
163 | SectionName = 'DGH IDE Explorer';
164 | (** An INI Key for the top position of the dialogue. **)
165 | strTopKey = 'Top';
166 | (** An INI Key for the left position of the dialogue. **)
167 | strLeftKey = 'Left';
168 | (** An INI Key for the width size of the dialogue. **)
169 | strWidthKey = 'Width';
170 | (** An INI Key for the height size of the dialogue. **)
171 | strHeightKey = 'Height';
172 | (** An INI Key for the width position of the tree view in the dialogue. **)
173 | strTreeWidthKey = 'TreeWidth';
174 | (** A constant for the image index to be used for classes. **)
175 | iClassImgIdx = 6;
176 |
177 | (**
178 |
179 | This method builds a hierarchical list of the components heritage.
180 |
181 | @precon Node must be a valid instance.
182 | @postcon The heritage tree is output to the hierarchies tab.
183 |
184 | @param Node as a PVirtualNode as a constant
185 |
186 | **)
187 | Procedure TDGHIDEExplorerForm.BuildComponentHeritage(Const Node : PVirtualNode);
188 |
189 | ResourceString
190 | strHeritage = 'Heritage';
191 |
192 | Var
193 | PNode: PVirtualNode;
194 | PNodeData: PDIEHierarchyData;
195 | NodeData : PDIEObjectData;
196 | ClassRef: TClass;
197 | strList: TStringList;
198 | i: Integer;
199 |
200 | Begin
201 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'BuildComponentHeritage', tmoTiming);{$ENDIF}
202 | If Assigned(Node) Then
203 | Begin
204 | NodeData := vstComponentTree.GetNodeData(Node);
205 | If Assigned(Nodedata.FObject) Then
206 | Begin
207 | ClassRef := TComponent(NodeData.FObject).ClassType;
208 | strList := TStringList.Create;
209 | Try
210 | While Assigned(ClassRef) Do
211 | Begin
212 | strList.Insert(0, ClassRef.ClassName);
213 | ClassRef := ClassRef.ClassParent;
214 | End;
215 | PNode := vstHierarchies.AddChild(Nil);
216 | PNodeData := vstHierarchies.GetNodeData(PNode);
217 | PNodeData.FQualifiedName := strHeritage;
218 | PNodeData.FImageIndex := Integer(tiApplication);
219 | For i := 0 To strList.Count - 1 Do
220 | Begin
221 | PNode := vstHierarchies.AddChild(PNode);
222 | PNodeData := vstHierarchies.GetNodeData(PNode);
223 | PNodeData.FQualifiedName := strList[i];
224 | PNodeData.FImageIndex := Integer(tiPackage);
225 | End;
226 | Finally
227 | strList.Free;
228 | End;
229 | End;
230 | End;
231 | End;
232 |
233 | (**
234 |
235 | This is the forms on show event. It initialises the tree view.
236 |
237 | @precon None.
238 | @postcon Iterates through the forms and data modules and adds them to the tree view.
239 |
240 | @param Sender as a TObject
241 |
242 | **)
243 | Procedure TDGHIDEExplorerForm.BuildFormComponentTree(Sender: TObject);
244 |
245 | (**
246 |
247 | This method adds a form/data module to a root node in the tree and then calls GetComponents to get the
248 | forms components.
249 |
250 | @precon ParentNode and Component must be valid instances.
251 | @postcon Adds a form/data module to a root node in the tree and then calls GetComponents to get the
252 | forms components.
253 |
254 | @param ParentNode as a PVirtualNode as a constant
255 | @param Component as a TComponent as a constant
256 | @param eTreeImage as a TIDEExplorerTreeImage as a constant
257 |
258 | **)
259 | Procedure IterateForms(Const ParentNode : PVirtualNode; Const Component : TComponent;
260 | Const eTreeImage : TIDEExplorerTreeImage);
261 |
262 | Var
263 | Node : PVirtualNode;
264 | NodeData : PDIEObjectData;
265 |
266 | Begin
267 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'BuildFormComponentTree/IterateForms', tmoTiming);{$ENDIF}
268 | Node := vstComponentTree.AddChild(ParentNode);
269 | NodeData := vstComponentTree.GetNodeData(Node);
270 | NodeData.FText := Format('%s: %s', [Component.Name, Component.ClassName]);
271 | NodeData.FObject := Component;
272 | NodeData.FImageIndex := Integer(eTreeImage);
273 | TIDEExplorerNEWRTTI.ProcessClass(vstComponentTree, Node, Component);
274 | GetComponents(Node, Component);
275 | End;
276 |
277 | ResourceString
278 | strApplication = 'Application';
279 | strScreen = 'Screen';
280 | strForms = 'Forms';
281 | strGettingAppicationClasses = 'Getting Application Classes...';
282 | strGettingScreenClasses = 'Getting Screen Classes...';
283 | strIteratingScreenForms = 'Iterating Screen Forms...';
284 | strIteratingScreenCustomForms = 'Iterating Screen Custom Forms...';
285 | strIteratingScreenDataModules = 'Iterating Screen Data Modules...';
286 | strExpandingAndSorting = 'Expanding and Sorting...';
287 |
288 | Const
289 | strCustomForms = 'CustomForms';
290 | strDataModules = 'DataModules';
291 | iProgressSteps = 6;
292 |
293 | Var
294 | i: Integer;
295 | ApplicationNode : PVirtualNode;
296 | ScreenNode : PVirtualNode;
297 | NodeData : PDIEObjectData;
298 | Node : PVirtualNode;
299 |
300 | Begin
301 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'BuildFormComponentTree', tmoTiming);{$ENDIF}
302 | FProgressMgr.Initialise(iProgressSteps);
303 | Try
304 | vstComponentTree.BeginUpdate;
305 | Try
306 | FProgressMgr.Show(strGettingAppicationClasses);
307 | FoundClasses.Clear;
308 | ApplicationNode := vstComponentTree.AddChild(Nil);
309 | NodeData := vstComponentTree.GetNodeData(ApplicationNode);
310 | NodeData.FText := strApplication;
311 | NodeData.FObject := Application;
312 | NodeData.FImageIndex := Integer(tiApplication);
313 | TIDEExplorerNEWRTTI.ProcessClass(vstComponentTree, ApplicationNode, Application);
314 | FProgressMgr.Update(strGettingScreenClasses);
315 | ScreenNode := vstComponentTree.AddChild(Nil);
316 | NodeData := vstComponentTree.GetNodeData(ScreenNode);
317 | NodeData.FText := strScreen;
318 | NodeData.FObject := Screen;
319 | NodeData.FImageIndex := Integer(tiApplication);
320 | TIDEExplorerNEWRTTI.ProcessClass(vstComponentTree, ScreenNode, Screen);
321 | FProgressMgr.Update(strIteratingScreenForms);
322 | Node := vstComponentTree.AddChild(ScreenNode);
323 | NodeData := vstComponentTree.GetNodeData(Node);
324 | NodeData.FText := strForms;
325 | NodeData.FObject := Nil;
326 | NodeData.FImageIndex := Integer(tiForms);
327 | For i := 0 To Screen.FormCount - 1 Do
328 | IterateForms(Node, Screen.Forms[i], tiForm);
329 | FProgressMgr.Update(strIteratingScreenCustomForms);
330 | Node := vstComponentTree.AddChild(ScreenNode);
331 | NodeData := vstComponentTree.GetNodeData(Node);
332 | NodeData.FText := strCustomForms;
333 | NodeData.FObject := Nil;
334 | NodeData.FImageIndex := Integer(tiForms);
335 | For i := 0 To Screen.CustomFormCount - 1 Do
336 | IterateForms(Node, Screen.CustomForms[i], tiForm);
337 | FProgressMgr.Update(strIteratingScreenDataModules);
338 | Node := vstComponentTree.AddChild(ScreenNode);
339 | NodeData := vstComponentTree.GetNodeData(Node);
340 | NodeData.FText := strDataModules;
341 | NodeData.FObject := Nil;
342 | NodeData.FImageIndex := Integer(tiDataModules);
343 | For i := 0 To Screen.DataModuleCount - 1 Do
344 | IterateForms(Node, Screen.DataModules[i], tiDataModule);
345 | FProgressMgr.Update(strExpandingAndSorting);
346 | vstComponentTree.Expanded[ApplicationNode] := True;
347 | vstComponentTree.Expanded[ScreenNode] := True;
348 | vstComponentTree.SortTree(0, sdAscending);
349 | Finally
350 | vstComponentTree.EndUpdate;
351 | End;
352 | Finally
353 | FProgressMgr.Hide;
354 | End;
355 | End;
356 |
357 | (**
358 |
359 | This method outputs the parent hierarchy of the TWinControl (if its a TWinControl).
360 |
361 | @precon Node must be a valid instance.
362 | @postcon The parent hierarchy is output to the hierarchies tab.
363 |
364 | @param Node as a PVirtualNode as a constant
365 |
366 | **)
367 | Procedure TDGHIDEExplorerForm.BuildParentHeritage(Const Node : PVirtualNode);
368 |
369 | ResourceString
370 | strParentage = 'Parentage';
371 |
372 | Var
373 | PNode: PVirtualNode;
374 | PNodeData : PDIEHierarchyData;
375 | NodeData : PDIEObjectData;
376 | Parent: TWinControl;
377 | slList: TStringList;
378 | i: Integer;
379 |
380 | Begin
381 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'BuildParentHeritage', tmoTiming);{$ENDIF}
382 | If Assigned(Node) Then
383 | Begin
384 | NodeData := vstComponentTree.GetNodeData(Node);
385 | If Assigned(NodeData.FObject) And (TObject(NodeData.FObject) Is TWinControl) Then
386 | Begin
387 | Parent := TWinControl(NodeData.FObject).Parent;
388 | slList := TStringList.Create;
389 | Try
390 | slList.Add(TWinControl(NodeData.FObject).Name + ' : ' + TWinControl(NodeData.FObject).ClassName);
391 | While Parent <> Nil Do
392 | Begin
393 | slList.Insert(0, Parent.Name + ' : ' + Parent.ClassName);
394 | Parent := Parent.Parent;
395 | End;
396 | PNode := vstHierarchies.AddChild(Nil);
397 | PNodeData := vstHierarchies.GetNodeData(PNode);
398 | PNodeData.FQualifiedName := strParentage;
399 | PNodeData.FImageIndex := Integer(tiApplication);
400 | For i := 0 To slList.Count - 1 Do
401 | Begin
402 | PNode := vstHierarchies.AddChild(PNode);
403 | PNodeData := vstHierarchies.GetNodeData(PNode);
404 | PNodeData.FQualifiedName := slList[i];
405 | PNodeData.FImageIndex := Integer(tiPackage);
406 | End;
407 | Finally
408 | slList.Free;
409 | End;
410 | End;
411 | End;
412 | End;
413 |
414 | (**
415 |
416 | This is an on change event handler for the Component Filter edit control.
417 |
418 | @precon None.
419 | @postcon Updates the last time the filter was changed.
420 |
421 | @param Sender as a TObject
422 |
423 | **)
424 | Procedure TDGHIDEExplorerForm.edtComponentFilterChange(Sender: TObject);
425 |
426 | Begin
427 | FLastComponentFilterUpdate := GetTickCount;
428 | End;
429 |
430 | (**
431 |
432 | This is an on change event handler for the View Filter edit control.
433 |
434 | @precon None.
435 | @postcon Updates the last time the filter was changed.
436 |
437 | @param Sender as a TObject
438 |
439 | **)
440 | Procedure TDGHIDEExplorerForm.edtPropertyFilterChange(Sender: TObject);
441 |
442 | Begin
443 | FLastViewFilterUpdate := GetTickCount;
444 | End;
445 |
446 | (**
447 |
448 | This method displays the form modally.
449 |
450 | @precon None.
451 | @postcon The form is displayed (theming is disabled as it causes an AV in the IDE).
452 |
453 | **)
454 | Class Procedure TDGHIDEExplorerForm.Execute;
455 |
456 | Var
457 | F : TDGHIDEExplorerForm;
458 | {$IFDEF RS102}
459 | {$IFDEF RS104}
460 | ITS : IOTAIDEThemingServices;
461 | {$ELSE}
462 | ITS : IOTAIDEThemingServices250;
463 | {$ENDIF RS104}
464 | {$ENDIF RS102}
465 |
466 | Begin
467 | {$IFDEF CODESITE}CodeSite.TraceMethod('TDGHIDEExplorerForm.Execute', tmoTiming);{$ENDIF}
468 | F := TDGHIDEExplorerForm.Create(Application.MainForm);
469 | Try
470 | {$IFDEF RS102}
471 | {$IFDEF RS104}
472 | If Supports(BorlandIDEServices, IOTAIDEThemingServices, ITS) Then
473 | {$ELSE}
474 | If Supports(BorlandIDEServices, IOTAIDEThemingServices250, ITS) Then
475 | {$ENDIF RS104}
476 | If ITS.IDEThemingEnabled Then
477 | Begin
478 | ITS.RegisterFormClass(TDGHIDEExplorerForm);
479 | ITS.ApplyTheme(F);
480 | End;
481 | {$ENDIF RS102}
482 | F.ShowModal;
483 | Finally
484 | F.Free;
485 | End;
486 | End;
487 |
488 | (**
489 |
490 | This method filters the component tree based on the regular expression in the Component Filter edit
491 | control.
492 |
493 | @precon None.
494 | @postcon Only the nodes with matching text (and their parents) are visible.
495 |
496 | **)
497 | Procedure TDGHIDEExplorerForm.FilterComponents;
498 |
499 | ResourceString
500 | strRegularExpressionError = 'Regular Expression Error';
501 |
502 | Var
503 | FilterRegEx: TRegEx;
504 | N, P: PVirtualNode;
505 | NodeData : PDIEObjectData;
506 | strFilterText : String;
507 |
508 | Begin
509 | strFilterText := edtComponentFilter.Text;
510 | Try
511 | If strFilterText.Length > 0 Then
512 | FilterRegEx := TRegEx.Create(strFilterText, [roIgnoreCase, roCompiled, roSingleLine]);
513 | Except
514 | On E : ERegularExpressionError Do
515 | Begin
516 | TaskMessageDlg(strRegularExpressionError, E.Message, mtError, [mbOK], 0);
517 | edtComponentFilter.SetFocus;
518 | Exit;
519 | End;
520 | End;
521 | vstComponentTree.BeginUpdate;
522 | Try
523 | N := vstComponentTree.GetFirst;
524 | While Assigned(N) Do
525 | Begin
526 | If strFilterText.Length > 0 Then
527 | Begin
528 | NodeData := vstComponentTree.GetNodeData(N);
529 | vstComponentTree.IsVisible[N] := FilterRegEx.IsMatch(NodeData.FText);
530 | If vstComponentTree.IsVisible[N] Then
531 | Begin
532 | P := vstComponentTree.NodeParent[N];
533 | While Assigned(P) Do
534 | Begin
535 | vstComponentTree.IsVisible[P] := True;
536 | P := vstComponentTree.NodeParent[P];
537 | End;
538 | End;
539 | End Else
540 | vstComponentTree.IsVisible[N] := True;
541 | N := vstComponentTree.GetNext(N);
542 | End;
543 | Finally
544 | vstComponentTree.EndUpdate;
545 | End;
546 | End;
547 |
548 | (**
549 |
550 | This method filters the given view using the indexed text column.
551 |
552 | @precon vstView must be a valid instance.
553 | @postcon The view is filtered.
554 |
555 | @param vstView as a TVirtualStringTree as a constant
556 | @param iColumnIndex as an Integer as a constant
557 |
558 | **)
559 | procedure TDGHIDEExplorerForm.FilterView(const vstView: TVirtualStringTree; const iColumnIndex: Integer);
560 |
561 | ResourceString
562 | strRegularExpressionError = 'Regular Expression Error';
563 |
564 | Var
565 | FilterRegEx: TRegEx;
566 | N: PVirtualNode;
567 | strFilterText : String;
568 |
569 | Begin
570 | strFilterText := edtPropertyFilter.Text;
571 | Try
572 | If strFilterText.Length > 0 Then
573 | FilterRegEx := TRegEx.Create(strFilterText, [roIgnoreCase, roCompiled, roSingleLine]);
574 | Except
575 | On E : ERegularExpressionError Do
576 | Begin
577 | TaskMessageDlg(strRegularExpressionError, E.Message, mtError, [mbOK], 0);
578 | edtPropertyFilter.SetFocus;
579 | Exit;
580 | End;
581 | End;
582 | vstView.BeginUpdate;
583 | Try
584 | N := vstView.GetFirst;
585 | While Assigned(N) Do
586 | Begin
587 | If strFilterText.Length > 0 Then
588 | vstView.IsVisible[N] := FilterRegEx.IsMatch(vstView.Text[N, iColumnIndex])
589 | Else
590 | vstView.IsVisible[N] := True;
591 | N := vstView.GetNext(N);
592 | End;
593 | Finally
594 | vstView.EndUpdate;
595 | End;
596 | End;
597 |
598 | (**
599 |
600 | This is an On Form Create Event Handler for the TDGHIDEExplorerForm class.
601 |
602 | @precon None.
603 | @postcon Loads the applications settings.
604 |
605 | @param Sender as a TObject
606 |
607 | **)
608 | Procedure TDGHIDEExplorerForm.FormCreate(Sender: TObject);
609 |
610 | Begin
611 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'FormCreate', tmoTiming);{$ENDIF}
612 | LoadSettings;
613 | FProgressMgr := TDIEProgressMgr.Create(Self);
614 | vstComponentTree.NodeDataSize := SizeOf(TDIEObjectData);
615 | vstFields.NodeDataSize := SizeOf(TDIEFieldData);
616 | vstMethods.NodeDataSize := SizeOf(TDIEMethodData);
617 | vstProperties.NodeDataSize := SizeOf(TDIEPropertyData);
618 | vstEvents.NodeDataSize := SizeOf(TDIEPropertyData);
619 | vstHierarchies.NodeDataSize := SizeOf(TDIEHierarchyData);
620 | vstOLDProperties.NodeDataSize := SizeOf(TDIEOLDPropertyData);
621 | End;
622 |
623 | (**
624 |
625 | This is an On Form Destroy Event Handler for the TDGHIDEExplorerForm class.
626 |
627 | @precon None.
628 | @postcon Saves the applications settings.
629 |
630 | @param Sender as a TObject
631 |
632 | **)
633 | Procedure TDGHIDEExplorerForm.FormDestroy(Sender: TObject);
634 |
635 | Begin
636 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'FormDestroy', tmoTiming);{$ENDIF}
637 | SaveSettings;
638 | End;
639 |
640 | (**
641 |
642 | This is an on form show event handler for the form.
643 |
644 | @precon None.
645 | @postcon Builds the forms component tree.
646 |
647 | @note Its MUCH MORE responsive here in the OnShow event than in the OnCreate event.
648 |
649 | @param Sender as a TObject
650 |
651 | **)
652 | Procedure TDGHIDEExplorerForm.FormShow(Sender: TObject);
653 |
654 | Begin
655 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'FormShow', tmoTiming);{$ENDIF}
656 | BuildFormComponentTree(Sender);
657 | pgcPropertiesMethodsAndEvents.ActivePageIndex := 0;
658 | End;
659 |
660 | (**
661 |
662 | This method iterates the IDE structure and populates the tree view.
663 |
664 | @precon Node and Component must be valid instances.
665 | @postcon Each component of the parent component is added to the given node.
666 |
667 | @param Node as a PVirtualNode as a constant
668 | @param Component as a TComponent as a constant
669 |
670 | **)
671 | Procedure TDGHIDEExplorerForm.GetComponents(Const Node: PVirtualNode; Const Component: TComponent);
672 |
673 | Var
674 | i: Integer;
675 | NewNode: PVirtualNode;
676 | NodeData : PDIEObjectData;
677 |
678 |
679 | Begin
680 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'GetComponents', tmoTiming);{$ENDIF}
681 | For i := 0 To Component.ComponentCount - 1 Do
682 | Begin
683 | NewNode := vstComponentTree.AddChild(Node);
684 | NodeData := vstComponentTree.GetNodeData(NewNode);
685 | NodeData.FText := Format('%s: %s', [
686 | Component.Components[i].Name,
687 | Component.Components[i].ClassName
688 | ]);
689 | NodeData.FObject := Component.Components[i];
690 | NodeData.FImageIndex := Integer(tiPackage);
691 | GetComponents(NewNode, Component.Components[i]);
692 | End;
693 | End;
694 |
695 | (**
696 |
697 | This method loads the applications settings from the registry.
698 |
699 | @precon None.
700 | @postcon The applications settings are loaded from the registry.
701 |
702 | **)
703 | Procedure TDGHIDEExplorerForm.LoadSettings;
704 |
705 | Const
706 | iDefaultColumnWidth = 100;
707 | iQuarter = 4;
708 | iHalf = 2;
709 |
710 | Var
711 | i : Integer;
712 | lv: TListView;
713 | j: Integer;
714 | R: TRegIniFile;
715 | VST: TVirtualStringTree;
716 |
717 | Begin
718 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'LoadSettings', tmoTiming);{$ENDIF}
719 | R := TRegIniFile.Create(RegKey);
720 | Try
721 | Self.Top := R.ReadInteger(SectionName, strTopKey, (Application.MainForm.Height - Height) Div iHalf);
722 | Self.Left := R.ReadInteger(SectionName, strLeftKey, (Application.MainForm.Width - Width) Div iHalf);
723 | Self.Width := R.ReadInteger(SectionName, strWidthKey, Width);
724 | Self.Height := R.ReadInteger(SectionName, strHeightKey, Height);
725 | pnlTreePanel.Width := R.ReadInteger(SectionName, strTreeWidthKey, Width Div iQuarter);
726 | For i := 0 To ComponentCount - 1 Do BEGIN
727 | If Components[i] Is TListView Then
728 | Begin
729 | lv := Components[i] As TListView;
730 | For j := 0 To lv.Columns.Count - 1 Do
731 | lv.Columns[j].Width := R.ReadInteger(lv.Name, lv.Column[j].Caption, iDefaultColumnWidth);
732 | End;
733 | If Components[i] Is TVirtualStringTree Then
734 | Begin
735 | VST := Components[i] As TVirtualStringTree;
736 | For j := 0 To VST.Header.Columns.Count - 1 Do
737 | VST.Header.Columns[j].Width := R.ReadInteger(
738 | VST.Name,
739 | VST.Header.Columns[j].Text,
740 | iDefaultColumnWidth
741 | );
742 | End;
743 | END;
744 | Finally
745 | R.Free;
746 | End;
747 | End;
748 |
749 | (**
750 |
751 | This method saves the applications settings to the registry.
752 |
753 | @precon None.
754 | @postcon The applications settings are saved to the registry.
755 |
756 | **)
757 | Procedure TDGHIDEExplorerForm.SaveSettings;
758 |
759 | Var
760 | i, j : Integer;
761 | lv : TListView;
762 | R: TRegIniFile;
763 | VST: TVirtualStringTree;
764 |
765 | Begin
766 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'SaveSettings', tmoTiming);{$ENDIF}
767 | R := TRegIniFile.Create(RegKey);
768 | Try
769 | R.WriteInteger(SectionName, strTopKey, Self.Top);
770 | R.WriteInteger(SectionName, strLeftKey, Self.Left);
771 | R.WriteInteger(SectionName, strWidthKey, Self.Width);
772 | R.WriteInteger(SectionName, strHeightKey, Self.Height);
773 | R.WriteInteger(SectionName, strTreeWidthKey, pnlTreePanel.Width);
774 | For i := 0 To ComponentCount - 1 Do BEGIN
775 | If Components[i] Is TListView Then
776 | Begin
777 | lv := Components[i] As TListView;
778 | For j := 0 To lv.Columns.Count - 1 Do
779 | R.WriteInteger(lv.Name, lv.Column[j].Caption, lv.Columns[j].Width);
780 | End;
781 | If Components[i] Is TVirtualStringTree Then
782 | Begin
783 | VST := Components[i] As TVirtualStringTree;
784 | For j := 0 To VST.Header.Columns.Count - 1 Do
785 | R.WriteInteger(VST.Name, VST.Header.Columns[j].Text, VST.Header.Columns[j].Width);
786 | End;
787 | END;
788 | Finally
789 | R.Free;
790 | End;
791 | End;
792 |
793 | (**
794 |
795 | This is a timer event handler for filtering the component tree and fields, method properties, etc.
796 |
797 | @precon None.
798 | @postcon The Component tree and / or Fields, Method Properties, etc are filtered.
799 |
800 | @param Sender as a TObject
801 |
802 | **)
803 | Procedure TDGHIDEExplorerForm.tmFilterTimerTimer(Sender: TObject);
804 |
805 | Const
806 | iUpdateInterval = 250;
807 |
808 | Begin
809 | If (FLastComponentFilterUpdate > 0) And (GetTickCount > FLastComponentFilterUpdate + iUpdateInterval) Then
810 | Try
811 | tmFilterTimer.Enabled := False;
812 | Try
813 | FilterComponents;
814 | Finally
815 | tmFilterTimer.Enabled := True;
816 | End;
817 | Finally
818 | FLastComponentFilterUpdate := 0;
819 | End;
820 | If (FLastViewFilterUpdate > 0) And (GetTickCount > FLastViewFilterUpdate + iUpdateInterval) Then
821 | Try
822 | tmFilterTimer.Enabled := False;
823 | Try
824 | FilterView(vstFields, 1);
825 | FilterView(vstMethods, 1);
826 | FilterView(vstProperties, 1);
827 | FilterView(vstEvents, 1);
828 | FilterView(vstOLDProperties, 0);
829 | Finally
830 | tmFilterTimer.Enabled := True;
831 | End;
832 | Finally
833 | FLastViewFilterUpdate := 0;
834 | End;
835 | End;
836 |
837 | (**
838 |
839 | This is an on compare event handler for the component treeview.
840 |
841 | @precon None.
842 | @postcon Sorts the component tree by the text.
843 |
844 | @param Sender as a TBaseVirtualTree
845 | @param Node1 as a PVirtualNode
846 | @param Node2 as a PVirtualNode
847 | @param Column as a TColumnIndex
848 | @param Result as an Integer as a reference
849 |
850 | **)
851 | Procedure TDGHIDEExplorerForm.vstComponentTreeCompareNodes(Sender: TBaseVirtualTree; Node1, Node2:
852 | PVirtualNode; Column: TColumnIndex; Var Result: Integer);
853 |
854 | Var
855 | NodeData1, NodeData2 : PDIEObjectData;
856 |
857 | Begin
858 | NodeData1 := Sender.GetNodeData(Node1);
859 | NodeData2 := Sender.GetNodeData(Node2);
860 | Result := Comparetext(NodeData1.FText, NodeData2.FText);
861 | End;
862 |
863 | (**
864 |
865 | This is the tree views on change event handler. It gets the item selected properties and displays them.
866 |
867 | @precon None.
868 | @postcon Clears the list views and re-populates them with data for the new selected node.
869 |
870 | @param Sender as a TBaseVirtualTree
871 | @param Node as a PVirtualNode
872 | @param Column as a TColumnIndex
873 |
874 | **)
875 | Procedure TDGHIDEExplorerForm.vstComponentTreeFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode;
876 | Column: TColumnIndex);
877 |
878 | ResourceString
879 | strClearingExistingData = 'Clearing existing data...';
880 | strFindingOLDProperties = 'Finding OLD properties...';
881 | strBuildingHierarachies = 'Building Hierarchies...';
882 |
883 | Const
884 | iProgressSteps = 6;
885 |
886 | Var
887 | NodeData: PDIEObjectData;
888 |
889 | Begin
890 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'tvComponentTreeChange', tmoTiming); {$ENDIF}
891 | FProgressMgr.Initialise(iProgressSteps);
892 | Try
893 | FProgressMgr.Show(strClearingExistingData);
894 | vstFields.Clear;
895 | vstMethods.Clear;
896 | vstProperties.Clear;
897 | vstEvents.Clear;
898 | vstHierarchies.Clear;
899 | vstOldProperties.Clear;
900 | edtPropertyFilter.Clear;
901 | If Assigned(Node) Then
902 | Begin
903 | NodeData := vstComponentTree.GetNodeData(Node);
904 | If Assigned(NodeData.FObject) Then
905 | Begin
906 | TIDEExplorerNEWRTTI.ProcessObjectFields(NodeData.FObject, vstFields, FProgressMgr);
907 | TIDEExplorerNEWRTTI.ProcessObjectMethods(NodeData.FObject, vstMethods, FProgressMgr);
908 | TIDEExplorerNEWRTTI.ProcessObjectProperties(NodeData.FObject, vstProperties, FProgressMgr);
909 | TIDEExplorerNEWRTTI.ProcessObjectEvents(NodeData.FObject, vstEvents, FProgressMgr);
910 | FProgressMgr.Update(strFindingOLDProperties);
911 | TIDEExplorerOLDRTTI.ProcessOldProperties(NodeData.FObject, vstOLDProperties);
912 | End;
913 | End;
914 | FProgressMgr.Update(strBuildingHierarachies);
915 | vstHierarchies.BeginUpdate;
916 | Try
917 | BuildComponentHeritage(Node);
918 | BuildParentHeritage(Node);
919 | vstHierarchies.FullExpand;
920 | Finally
921 | vstHierarchies.EndUpdate;
922 | End;
923 | Finally
924 | FProgressMgr.Hide;
925 | End;
926 | End;
927 |
928 | (**
929 |
930 | This is an on free node event handler for the component treeview.
931 |
932 | @precon None.
933 | @postcon Frees the memory used by the node (managed types like strings).
934 |
935 | @param Sender as a TBaseVirtualTree
936 | @param Node as a PVirtualNode
937 |
938 | **)
939 | Procedure TDGHIDEExplorerForm.vstComponentTreeFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
940 |
941 | Var
942 | NodeData : PDIEObjectData;
943 |
944 | Begin
945 | NodeData := Sender.GetNodeData(Node);
946 | Finalize(NodeData^);
947 | End;
948 |
949 | (**
950 |
951 | This is an on get image index event handler for the component treeview.
952 |
953 | @precon None.
954 | @postcon Returns the image index for the node.
955 |
956 | @param Sender as a TBaseVirtualTree
957 | @param Node as a PVirtualNode
958 | @param Kind as a TVTImageKind
959 | @param Column as a TColumnIndex
960 | @param Ghosted as a Boolean as a reference
961 | @param ImageIndex as a TImageIndex as a reference
962 |
963 | **)
964 | Procedure TDGHIDEExplorerForm.vstComponentTreeGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
965 | Kind: TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex: TImageIndex);
966 |
967 | Var
968 | NodeData : PDIEObjectData;
969 |
970 | Begin
971 | If Kind In [ikNormal..ikSelected] Then
972 | Begin
973 | NodeData := Sender.GetNodeData(Node);
974 | ImageIndex := NodeData.FImageIndex;
975 | End;
976 | End;
977 |
978 | (**
979 |
980 | This is an on Get Text event handler for the Components treeview.
981 |
982 | @precon None.
983 | @postcon Returns the text for the node.
984 |
985 | @param Sender as a TBaseVirtualTree
986 | @param Node as a PVirtualNode
987 | @param Column as a TColumnIndex
988 | @param TextType as a TVSTTextType
989 | @param CellText as a String as a reference
990 |
991 | **)
992 | Procedure TDGHIDEExplorerForm.vstComponentTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
993 | TColumnIndex; TextType: TVSTTextType; Var CellText: String);
994 |
995 | Var
996 | NodeData : PDIEObjectData;
997 |
998 | Begin
999 | NodeData := Sender.GetNodeData(Node);
1000 | CellText := NodeData.FText;
1001 | End;
1002 |
1003 | (**
1004 |
1005 | This is an on double click event handler for the fields VTV control.
1006 |
1007 | @precon None.
1008 | @postcon Allows the user to drill-down into classes.
1009 |
1010 | @param Sender as a TObject
1011 |
1012 | **)
1013 | Procedure TDGHIDEExplorerForm.vstFieldsDblClick(Sender: TObject);
1014 |
1015 | ResourceString
1016 | strYouCannotDrillDownOnThisField = 'You cannot drill down on this field.';
1017 |
1018 | Var
1019 | Node: PVirtualNode;
1020 | NodeData : PDIEFieldData;
1021 | ComponentNodeData : PDIEObjectData;
1022 |
1023 | Begin
1024 | If Not Assigned(vstFields.FocusedNode) Then
1025 | Exit;
1026 | NodeData := vstFields.GetNodeData(vstFields.FocusedNode);
1027 | If Not Assigned(NodeData.FObject) Then
1028 | Begin
1029 | MessageDlg(strYouCannotDrillDownOnThisField, mtWarning, [mbOK], 0);
1030 | Exit;
1031 | End;
1032 | Node := vstComponentTree.AddChild(vstComponentTree.FocusedNode);
1033 | ComponentNodeData := vstComponentTree.GetNodeData(Node);
1034 | ComponentNodeData.FText := NodeData.FQualifiedName;
1035 | ComponentNodeData.FObject := NodeData.FObject;
1036 | ComponentNodeData.FImageIndex := iClassImgIdx;
1037 | vstComponentTree.Expanded[vstComponentTree.FocusedNode] := True;
1038 | vstComponentTree.FocusedNode := Node;
1039 | vstComponentTree.Selected[vstComponentTree.FocusedNode] := True;
1040 | End;
1041 |
1042 | (**
1043 |
1044 | This is an on free event handler for the Fields treeview.
1045 |
1046 | @precon None.
1047 | @postcon Finalises the managed types in the treeview node.
1048 |
1049 | @param Sender as a TBaseVirtualTree
1050 | @param Node as a PVirtualNode
1051 |
1052 | **)
1053 | Procedure TDGHIDEExplorerForm.vstFieldsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
1054 |
1055 | Var
1056 | NodeData : PDIEFieldData;
1057 |
1058 | Begin
1059 | NodeData := Sender.GetNodeData(Node);
1060 | Finalize(NodeData^);
1061 | End;
1062 |
1063 | (**
1064 |
1065 | This is an on Get Image Index event handler for the Fields treeview.
1066 |
1067 | @precon None.
1068 | @postcon Returns the indexes for the State and image indexes.
1069 |
1070 | @param Sender as a TBaseVirtualTree
1071 | @param Node as a PVirtualNode
1072 | @param Kind as a TVTImageKind
1073 | @param Column as a TColumnIndex
1074 | @param Ghosted as a Boolean as a reference
1075 | @param ImageIndex as a TImageIndex as a reference
1076 |
1077 | **)
1078 | Procedure TDGHIDEExplorerForm.vstFieldsGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind:
1079 | TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex: TImageIndex);
1080 |
1081 | Var
1082 | NodeData : PDIEFieldData;
1083 |
1084 | Begin
1085 | NodeData := Sender.GetNodeData(Node);
1086 | If Column = 0 Then
1087 | Case Kind Of
1088 | ikNormal,
1089 | ikSelected,
1090 | ikOverlay: ImageIndex := NodeData.FVisibilityIndex;
1091 | ikState: ImageIndex := NodeData.FImageIndex;
1092 | End;
1093 | End;
1094 |
1095 | (**
1096 |
1097 | This is an on get text event handler for the Fields treeview.
1098 |
1099 | @precon None.
1100 | @postcon Provide the correct text for the field from the nodes record.
1101 |
1102 | @param Sender as a TBaseVirtualTree
1103 | @param Node as a PVirtualNode
1104 | @param Column as a TColumnIndex
1105 | @param TextType as a TVSTTextType
1106 | @param CellText as a String as a reference
1107 |
1108 | **)
1109 | Procedure TDGHIDEExplorerForm.vstFieldsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
1110 | TColumnIndex; TextType: TVSTTextType; Var CellText: String);
1111 |
1112 | Type
1113 | TDIEFieldFields = (ffVisibility, ffQualifiedName, ffType, ffOffset, ffKind, ffSize, ffValue);
1114 |
1115 | Var
1116 | NodeData : PDIEFieldData;
1117 |
1118 | Begin
1119 | NodeData := Sender.GetNodeData(Node);
1120 | Case TDIEFieldFields(Column) Of
1121 | ffVisibility: CellText := NodeData.FVisibility;
1122 | ffQualifiedName: CellText := NodeData.FQualifiedName;
1123 | ffType: CellText := NodeData.FType;
1124 | ffOffset: CellText := NodeData.FOffset;
1125 | ffKind: CellText := NodeData.FKind;
1126 | ffSize: CellText := NodeData.FSize;
1127 | ffValue: CellText := NodeData.FValue;
1128 | End;
1129 | End;
1130 |
1131 | (**
1132 |
1133 | This is an on free event handler for the Hierarchies treeview.
1134 |
1135 | @precon None.
1136 | @postcon Finalises the managed types in the treeview node.
1137 |
1138 | @param Sender as a TBaseVirtualTree
1139 | @param Node as a PVirtualNode
1140 |
1141 | **)
1142 | Procedure TDGHIDEExplorerForm.vstHierarchiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
1143 |
1144 | Var
1145 | NodeData : PDIEHierarchyData;
1146 |
1147 | Begin
1148 | NodeData := Sender.GetNodeData(Node);
1149 | FInalize(NodeData^);
1150 | End;
1151 |
1152 | (**
1153 |
1154 | This is an on Get Image Index event handler for the Hierarchies treeview.
1155 |
1156 | @precon None.
1157 | @postcon Returns the indexes for the State and image indexes.
1158 |
1159 | @param Sender as a TBaseVirtualTree
1160 | @param Node as a PVirtualNode
1161 | @param Kind as a TVTImageKind
1162 | @param Column as a TColumnIndex
1163 | @param Ghosted as a Boolean as a reference
1164 | @param ImageIndex as a TImageIndex as a reference
1165 |
1166 | **)
1167 | Procedure TDGHIDEExplorerForm.vstHierarchiesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
1168 | Kind: TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex: TImageIndex);
1169 |
1170 | Var
1171 | NodeData : PDIEHierarchyData;
1172 |
1173 | Begin
1174 | NodeData := Sender.GetNodeData(Node);
1175 | If Kind In [ikNormal..ikSelected] Then
1176 | ImageIndex := NodeData.FImageIndex;
1177 | End;
1178 |
1179 | (**
1180 |
1181 | This is an on get text event handler for the Hierarchies treeview.
1182 |
1183 | @precon None.
1184 | @postcon Provide the correct text for the hierarchy / Parentage from the nodes record.
1185 |
1186 | @param Sender as a TBaseVirtualTree
1187 | @param Node as a PVirtualNode
1188 | @param Column as a TColumnIndex
1189 | @param TextType as a TVSTTextType
1190 | @param CellText as a String as a reference
1191 |
1192 | **)
1193 | Procedure TDGHIDEExplorerForm.vstHierarchiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
1194 | Column: TColumnIndex; TextType: TVSTTextType; Var CellText: String);
1195 |
1196 | Var
1197 | NodeData : PDIEHierarchyData;
1198 |
1199 | Begin
1200 | NodeData := Sender.GetNodeData(Node);
1201 | CellText := NodeData.FQualifiedName;
1202 | End;
1203 |
1204 | (**
1205 |
1206 | This is an on free event handler for the Methods treeview.
1207 |
1208 | @precon None.
1209 | @postcon Finalises the managed types in the treeview node.
1210 |
1211 | @param Sender as a TBaseVirtualTree
1212 | @param Node as a PVirtualNode
1213 |
1214 | **)
1215 | Procedure TDGHIDEExplorerForm.vstMethodsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
1216 |
1217 | Var
1218 | NodeData : PDIEMethodData;
1219 |
1220 | Begin
1221 | NodeData := Sender.GetNodeData(Node);
1222 | Finalize(NodeData^);
1223 | End;
1224 |
1225 | (**
1226 |
1227 | This is an on Get Image Index event handler for the Methods treeview.
1228 |
1229 | @precon None.
1230 | @postcon Returns the indexes for the State and image indexes.
1231 |
1232 | @param Sender as a TBaseVirtualTree
1233 | @param Node as a PVirtualNode
1234 | @param Kind as a TVTImageKind
1235 | @param Column as a TColumnIndex
1236 | @param Ghosted as a Boolean as a reference
1237 | @param ImageIndex as a TImageIndex as a reference
1238 |
1239 | **)
1240 | Procedure TDGHIDEExplorerForm.vstMethodsGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
1241 | Kind: TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex: TImageIndex);
1242 |
1243 | Var
1244 | NodeData : PDIEMethodData;
1245 |
1246 | Begin
1247 | NodeData := Sender.GetNodeData(Node);
1248 | If Column = 0 Then
1249 | Case Kind Of
1250 | ikNormal,
1251 | ikSelected,
1252 | ikOverlay: ImageIndex := NodeData.FVisibilityIndex;
1253 | ikState: ImageIndex := NodeData.FImageIndex;
1254 | End;
1255 | End;
1256 |
1257 | (**
1258 |
1259 | This is an on get text event handler for the Methods treeview.
1260 |
1261 | @precon None.
1262 | @postcon Provide the correct text for the method from the nodes record.
1263 |
1264 | @param Sender as a TBaseVirtualTree
1265 | @param Node as a PVirtualNode
1266 | @param Column as a TColumnIndex
1267 | @param TextType as a TVSTTextType
1268 | @param CellText as a String as a reference
1269 |
1270 | **)
1271 | Procedure TDGHIDEExplorerForm.vstMethodsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
1272 | TColumnIndex; TextType: TVSTTextType; Var CellText: String);
1273 |
1274 | Type
1275 | TDIEMethodFields = (mfVisibility, mfQualifiedName, mfType, mfSignature);
1276 |
1277 | Var
1278 | NodeData : PDIEMethodData;
1279 |
1280 | Begin
1281 | NodeData := Sender.GetNodeData(Node);
1282 | Case TDIEMethodFields(Column) Of
1283 | mfVisibility: CellText := NodeData.FVisibility;
1284 | mfQualifiedName: CellText := NodeData.FQualifiedName;
1285 | mfType: CellText := NodeData.FType;
1286 | mfSignature: CellText := NodeData.FSignature;
1287 | End;
1288 | End;
1289 |
1290 | (**
1291 |
1292 | This is an on free event handler for the Properties treeview.
1293 |
1294 | @precon None.
1295 | @postcon Finalises the managed types in the treeview node.
1296 |
1297 | @param Sender as a TBaseVirtualTree
1298 | @param Node as a PVirtualNode
1299 |
1300 | **)
1301 | Procedure TDGHIDEExplorerForm.vstOLDPropertiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
1302 |
1303 | Var
1304 | NodeData : PDIEOLDPropertyData;
1305 |
1306 | Begin
1307 | NodeData := Sender.GetNodeData(Node);
1308 | FInalize(NodeData^);
1309 | End;
1310 |
1311 | (**
1312 |
1313 | This is an on Get Image Index event handler for the Properties treeview.
1314 |
1315 | @precon None.
1316 | @postcon Returns the indexes for the State and image indexes.
1317 |
1318 | @param Sender as a TBaseVirtualTree
1319 | @param Node as a PVirtualNode
1320 | @param Kind as a TVTImageKind
1321 | @param Column as a TColumnIndex
1322 | @param Ghosted as a Boolean as a reference
1323 | @param ImageIndex as a TImageIndex as a reference
1324 |
1325 | **)
1326 | Procedure TDGHIDEExplorerForm.vstOLDPropertiesGetImageIndex(Sender: TBaseVirtualTree; Node:
1327 | PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex:
1328 | TImageIndex);
1329 |
1330 | Var
1331 | NodeData : PDIEOLDPropertyData;
1332 |
1333 | Begin
1334 | NodeData := Sender.GetNodeData(Node);
1335 | If Column = 0 Then
1336 | If Column = 0 Then
1337 | Case Kind Of
1338 | ikNormal,
1339 | ikSelected,
1340 | ikOverlay: ImageIndex := Integer(mvPublished);
1341 | ikState: ImageIndex := NodeData.FImageIndex;
1342 | End;
1343 | End;
1344 |
1345 | (**
1346 |
1347 | This is an on get text event handler for the Properties treeview.
1348 |
1349 | @precon None.
1350 | @postcon Provide the correct text for the properties from the nodes record.
1351 |
1352 | @param Sender as a TBaseVirtualTree
1353 | @param Node as a PVirtualNode
1354 | @param Column as a TColumnIndex
1355 | @param TextType as a TVSTTextType
1356 | @param CellText as a String as a reference
1357 |
1358 | **)
1359 | Procedure TDGHIDEExplorerForm.vstOLDPropertiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
1360 | Column: TColumnIndex; TextType: TVSTTextType; Var CellText: String);
1361 |
1362 | Type
1363 | TDIEPropertyFields = (pfQualifiedName, pfType, pfKind, pfValue);
1364 |
1365 | Var
1366 | NodeData : PDIEOLDPropertyData;
1367 |
1368 | Begin
1369 | NodeData := Sender.GetNodeData(Node);
1370 | Case TDIEPropertyFields(Column) Of
1371 | pfQualifiedName: CellText := NodeData.FQualifiedName;
1372 | pfType: CellText := NodeData.FType;
1373 | pfKind: CellText := NodeData.FKind;
1374 | pfValue: CellText := NodeData.FValue;
1375 | End;
1376 | End;
1377 |
1378 | (**
1379 |
1380 | This is an on double click event handler for the property VTV control.
1381 |
1382 | @precon None.
1383 | @postcon Allows the user to drill-down into classes.
1384 |
1385 | @param Sender as a TObject
1386 |
1387 | **)
1388 | Procedure TDGHIDEExplorerForm.vstPropertiesDblClick(Sender: TObject);
1389 |
1390 | ResourceString
1391 | strYouCannotDrillDownOnThisProperty = 'You cannot drill down on this property.';
1392 |
1393 | Var
1394 | Node: PVirtualNode;
1395 | NodeData : PDIEPropertyData;
1396 | ComponentNodeData : PDIEObjectData;
1397 |
1398 | Begin
1399 | If Not Assigned(vstProperties.FocusedNode) Then
1400 | Exit;
1401 | NodeData := vstProperties.GetNodeData(vstProperties.FocusedNode);
1402 | If Not Assigned(NodeData.FObject) Then
1403 | Begin
1404 | MessageDlg(strYouCannotDrillDownOnThisProperty, mtWarning, [mbOK], 0);
1405 | Exit;
1406 | End;
1407 | Node := vstComponentTree.AddChild(vstComponentTree.FocusedNode);
1408 | ComponentNodeData := vstComponentTree.GetNodeData(Node);
1409 | ComponentNodeData.FText := NodeData.FQualifiedName;
1410 | ComponentNodeData.FObject := NodeData.FObject;
1411 | ComponentNodeData.FImageIndex := iClassImgIdx;
1412 | vstComponentTree.Expanded[vstComponentTree.FocusedNode] := True;
1413 | vstComponentTree.FocusedNode := Node;
1414 | vstComponentTree.Selected[vstComponentTree.FocusedNode] := True;
1415 | End;
1416 |
1417 | (**
1418 |
1419 | This is an on free event handler for the Properties treeview.
1420 |
1421 | @precon None.
1422 | @postcon Finalises the managed types in the treeview node.
1423 |
1424 | @param Sender as a TBaseVirtualTree
1425 | @param Node as a PVirtualNode
1426 |
1427 | **)
1428 | Procedure TDGHIDEExplorerForm.vstPropertiesFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
1429 |
1430 | Var
1431 | NodeData : PDIEPropertyData;
1432 |
1433 | Begin
1434 | NodeData := Sender.GetNodeData(Node);
1435 | Finalize(NodeData^);
1436 | End;
1437 |
1438 | (**
1439 |
1440 | This is an on Get Image Index event handler for the Properties treeview.
1441 |
1442 | @precon None.
1443 | @postcon Returns the indexes for the State and image indexes.
1444 |
1445 | @param Sender as a TBaseVirtualTree
1446 | @param Node as a PVirtualNode
1447 | @param Kind as a TVTImageKind
1448 | @param Column as a TColumnIndex
1449 | @param Ghosted as a Boolean as a reference
1450 | @param ImageIndex as a TImageIndex as a reference
1451 |
1452 | **)
1453 | Procedure TDGHIDEExplorerForm.vstPropertiesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
1454 | Kind: TVTImageKind; Column: TColumnIndex; Var Ghosted: Boolean; Var ImageIndex: TImageIndex);
1455 |
1456 | Var
1457 | NodeData : PDIEPropertyData;
1458 |
1459 | Begin
1460 | NodeData := Sender.GetNodeData(Node);
1461 | If Column = 0 Then
1462 | Case Kind Of
1463 | ikNormal,
1464 | ikSelected,
1465 | ikOverlay: ImageIndex := NodeData.FVisibilityIndex;
1466 | ikState: ImageIndex := NodeData.FImageIndex;
1467 | End;
1468 | End;
1469 |
1470 | (**
1471 |
1472 | This is an on get text event handler for the Properties treeview.
1473 |
1474 | @precon None.
1475 | @postcon Provide the correct text for the properties from the nodes record.
1476 |
1477 | @param Sender as a TBaseVirtualTree
1478 | @param Node as a PVirtualNode
1479 | @param Column as a TColumnIndex
1480 | @param TextType as a TVSTTextType
1481 | @param CellText as a String as a reference
1482 |
1483 | **)
1484 | Procedure TDGHIDEExplorerForm.vstPropertiesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
1485 | TColumnIndex; TextType: TVSTTextType; Var CellText: String);
1486 |
1487 | Type
1488 | TDIEPropertyFields = (pfVisibility, pfQualifiedName, pfType, pfAccess, pfKind, pfSize, pfValue);
1489 |
1490 | Var
1491 | NodeData : PDIEPropertyData;
1492 |
1493 | Begin
1494 | NodeData := Sender.GetNodeData(Node);
1495 | Case TDIEPropertyFields(Column) Of
1496 | pfVisibility: CellText := NodeData.FVisibility;
1497 | pfQualifiedName: CellText := NodeData.FQualifiedName;
1498 | pfType: CellText := NodeData.FType;
1499 | pfAccess: CellText := NodeData.FAccess;
1500 | pfKind: CellText := NodeData.FKind;
1501 | pfSize: CellText := NodeData.FSize;
1502 | pfValue: CellText := NodeData.FValue;
1503 | End;
1504 | End;
1505 |
1506 | End.
1507 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.Functions.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains common functions to be used throughout the plug-in.
4 |
5 | @Author David Hoyle
6 | @Version 1.092
7 | @Date 04 Jun 2020
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.Functions;
31 |
32 | Interface
33 |
34 | Uses
35 | IDEExplorer.Types;
36 |
37 | Procedure BuildNumber(Var VersionInfo: TVersionInfo);
38 | Function FatalValue(Const strPropertyName: String): Boolean;
39 |
40 | Implementation
41 |
42 | Uses
43 | {$IFDEF DEBUG}
44 | CodeSiteLogging,
45 | {$ENDIF}
46 | SysUtils,
47 | Windows;
48 |
49 | (**
50 |
51 | This method extracts the build number from the executables resource.
52 |
53 | @precon None.
54 | @postcon the build information is placed into the passed version record.
55 |
56 | @param VersionInfo as a TVersionInfo as a reference
57 |
58 | **)
59 | Procedure BuildNumber(Var VersionInfo: TVersionInfo);
60 |
61 | Const
62 | iShiftRight = 16;
63 | iWordMask = $FFFF;
64 |
65 | Var
66 | VerInfoSize: DWORD;
67 | VerInfo: Pointer;
68 | VerValueSize: DWORD;
69 | VerValue: PVSFixedFileInfo;
70 | Dummy: DWORD;
71 | strBuffer: Array [0 .. MAX_PATH] Of Char;
72 |
73 | Begin
74 | GetModuleFileName(hInstance, strBuffer, MAX_PATH);
75 | VerInfoSize := GetFileVersionInfoSize(strBuffer, Dummy);
76 | If VerInfoSize <> 0 Then
77 | Begin
78 | GetMem(VerInfo, VerInfoSize);
79 | Try
80 | GetFileVersionInfo(strBuffer, 0, VerInfoSize, VerInfo);
81 | VerQueryValue(VerInfo, '\', Pointer(VerValue), VerValueSize);
82 | VersionInfo.iMajor := VerValue^.dwFileVersionMS Shr iShiftRight;
83 | VersionInfo.iMinor := VerValue^.dwFileVersionMS And iWordMask;
84 | VersionInfo.iBugfix := VerValue^.dwFileVersionLS Shr iShiftRight;
85 | VersionInfo.iBuild := VerValue^.dwFileVersionLS And iWordMask;
86 | Finally
87 | FreeMem(VerInfo, VerInfoSize);
88 | End;
89 | End;
90 | End;
91 |
92 | (**
93 |
94 | This function test whether the given name is one the the predetermined names that fail to return a
95 | value when queried.
96 |
97 | @precon None.
98 | @postcon Returns true if the given name is one of the predetermined names that fail to return a value
99 | in the IDE.
100 |
101 | @param strPropertyName as a String as a constant
102 | @return a Boolean
103 |
104 | **)
105 | Function FatalValue(Const strPropertyName: String): Boolean;
106 |
107 | Const
108 | strFatalPropertyNames : Array[1..3] Of String = (
109 | 'COMComponent',
110 | 'COMObject',
111 | 'InteropWindowHandle'
112 | );
113 |
114 | Var
115 | iFirst, iMid, iLast : Integer;
116 | iCompareResult: Integer;
117 |
118 | Begin
119 | Result := False;
120 | iFirst := Low(strFatalPropertyNames);
121 | iLast := High(strFatalPropertyNames);
122 | While iFirst <= iLast Do
123 | Begin
124 | iMid := (iFirst + iLast) Div 2;
125 | iCompareResult := CompareText(strPropertyName, strFatalPropertyNames[iMid]);
126 | Case iCompareResult Of
127 | -MaxInt..-1: iLast := Pred(iMid);
128 | 0:
129 | Begin
130 | Result := True;
131 | Break;
132 | End;
133 | 1..MaxInt: iFirst := Succ(iMid);
134 | End;
135 |
136 | End;
137 | End;
138 |
139 | End.
140 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.Interfaces.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains interfaces for use throughout the application.
4 |
5 | @Author David Hoyle
6 | @Version 1.149
7 | @Date 04 Jun 2020
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.Interfaces;
31 |
32 | Interface
33 |
34 | Type
35 | (** This interface defines a progress manager for displaying and updated programme on the screen. **)
36 | IDIEProgressMgr = Interface
37 | ['{912F0096-D722-4F5A-ACB0-89A84C54AFE3}']
38 | Procedure Initialise(Const iSteps : Integer);
39 | Procedure Show(Const strInitMsg : String);
40 | Procedure Update(Const strMsg : String);
41 | Procedure Hide();
42 | End;
43 |
44 | Implementation
45 |
46 | End.
47 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.OLDRTTIFunctions.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains the old style RTTI information.
4 |
5 | @Author David Hoyle
6 | @Version 1.721
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.OLDRTTIFunctions;
31 |
32 | Interface
33 |
34 | {$INCLUDE CompilerDefinitions.inc}
35 |
36 | Uses
37 | TypInfo,
38 | ComCtrls,
39 | VirtualTrees;
40 |
41 | Type
42 | (** A record to encapsulate the OLD RTTI property methods. **)
43 | TIDEExplorerOLDRTTI = Record
44 | Strict Private
45 | Class Function PropertyValueEnumerate(Const ptrData :Pointer;
46 | Const PropListItem : PPropInfo): String; Static;
47 | Class Function PropertyValueInteger(Const ptrData : Pointer;
48 | Const PropListItem : PPropInfo): String; Static;
49 | Class Function PropertyValueMethod(Const ptrData: Pointer;
50 | Const PropListItem: PPropInfo): String; Static;
51 | Class Function PropertyValueSet(Const ptrData: Pointer;
52 | Const PropListItem: PPropInfo): String; Static;
53 | Class Function PropertyValue(Const PropListItem : PPropInfo;
54 | Const ptrData : TObject): String; Static;
55 | Public
56 | Class Procedure ProcessOldProperties(Const ptrData : Pointer;
57 | Const vstOLDProperties : TVirtualStringTree); Static;
58 | End;
59 |
60 | Implementation
61 |
62 | Uses
63 | SysUtils,
64 | Classes,
65 | Graphics,
66 | Controls,
67 | IDEExplorer.Functions, IDEExplorer.Types;
68 |
69 | (**
70 |
71 | This procedure extracts the old published properties of the given object pointer and adds a treeview
72 | item for each property.
73 |
74 | @precon View and ptrData must be valid instances.
75 | @postcon A treeview item is added to the view for each published property of the object.
76 |
77 | @param ptrData as a Pointer as a constant
78 | @param vstOLDProperties as a TVirtualStringTree as a constant
79 |
80 | **)
81 | Class Procedure TIDEExplorerOLDRTTI.ProcessOldProperties(Const ptrData : Pointer;
82 | Const vstOLDProperties : TVirtualStringTree);
83 |
84 | ResourceString
85 | strUnknown = '< Unknown >';
86 |
87 | Const
88 | strTColor = 'TColor';
89 | strTCursor = 'TCursor';
90 |
91 | Var
92 | Node : PVirtualNode;
93 | NodeData : PDIEOLDPropertyData;
94 | i: Integer;
95 | PropList: PPropList;
96 | iNumOfProps: Integer;
97 |
98 | Begin
99 | vstOLDProperties.BeginUpdate;
100 | Try
101 | GetMem(PropList, SizeOf(TPropList));
102 | Try
103 | iNumOfProps := GetPropList(TComponent(ptrData).ClassInfo, tkAny, PropList);
104 | For i := 0 To iNumOfProps - 1 Do
105 | Begin
106 | Node := vstOLDProperties.AddChild(Nil);
107 | NodeData := vstOLDProperties.GetNodeData(Node);
108 | NodeData.FQualifiedName := String(PropList[i].Name);
109 | NodeData.FType := String(PropList[i].PropType^.Name);
110 | NodeData.FImageIndex := Integer(PropList[i].PropType^.Kind);
111 | NodeData.FKind := GetEnumName(TypeInfo(TTypeKind), Ord(PropList[i].PropType^.Kind));
112 | If Not FatalValue(UTF8ToString(PropList[i].Name)) Then
113 | NodeData.FValue := PropertyValue(PropList[i], ptrData)
114 | Else
115 | NodeData.FValue := strUnknown;
116 | If NodeData.FType = strTColor Then
117 | NodeData.FValue := ColorToString(StrToInt(NodeData.FValue));
118 | If NodeData.FType = strTCursor Then
119 | NodeData.FValue := CursorToString(StrToInt(NodeData.FValue));
120 | End;
121 | Finally
122 | FreeMem(PropList, SizeOf(TPropList));
123 | End;
124 | Finally
125 | vstOLDProperties.EndUpdate;
126 | End;
127 | End;
128 |
129 | (**
130 |
131 | This method returns a string representation of the given property`s value.
132 |
133 | @precon PropListItem, and ptrData must be valid instances.
134 | @postcon A string representation of the property is returned.
135 |
136 | @param PropListItem as a PPropInfo as a constant
137 | @param ptrData as a TObject as a constant
138 | @return a String
139 |
140 | **)
141 | Class Function TIDEExplorerOLDRTTI.PropertyValue(Const PropListItem : PPropInfo;
142 | Const ptrData : TObject): String;
143 |
144 | ResourceString
145 | strUnknown = '< Unknown >';
146 | strUnhandled = '[== Unhandled ==]';
147 | strClass = '< Class >';
148 | strVariant = '< Variant >';
149 | strArray = '< Array >';
150 | strRecord = '< Record >';
151 | strInteface = '< Interface >';
152 | strClassRef = '< Class Ref >';
153 | strPointer = '< Pointer >';
154 | strProcedure = '< Procedure >';
155 | strMISSINGPROPERTYHANDLER = '< MISSING PROPERTY HANDLER >';
156 |
157 | Begin
158 | Case PropListItem.PropType^.Kind Of
159 | tkUnknown: Result := strUnknown;
160 | tkInteger: Result := PropertyValueInteger(ptrData, PropListItem);
161 | tkChar: Result := strUnhandled;
162 | tkEnumeration: Result := PropertyValueEnumerate(ptrData, PropListItem);
163 | tkFloat: Result := FloatToStr(GetFloatProp(TObject(ptrData), PropListItem));
164 | tkString: Result := GetStrProp(TObject(ptrData), PropListItem);
165 | tkSet: Result := PropertyValueSet(ptrData, PropListItem);
166 | tkClass: Result := strClass;
167 | tkMethod: Result := PropertyValueMethod(ptrData, PropListItem);
168 | tkWChar: Result := strUnhandled;
169 | tkLString: Result := GetStrProp(TObject(ptrData), PropListItem);
170 | tkWString: Result := GetWideStrProp(TObject(ptrData), PropListItem);
171 | tkVariant: Result := strVariant;
172 | tkArray: Result := strArray;
173 | tkRecord: Result := strRecord;
174 | tkInterface: Result := strInteface {GetInterfaceProp(TObject(ptrData), PropList[i])};
175 | tkInt64: Result := IntToStr(GetInt64Prop(TObject(ptrData), PropListItem));
176 | tkDynArray: Result := Format('%x', [GetDynArrayProp(TObject(ptrData), PropListItem)]);
177 | {$IFDEF RS102}
178 | tkUString: Result := GetStrProp(TObject(ptrData), PropListItem);
179 | {$ELSE}
180 | tkUString: Result := GetUnicodeStrProp(TObject(ptrData), PropListItem);
181 | {$ENDIF RS102}
182 | tkClassRef: Result := strClassRef;
183 | tkPointer: Result := strPointer;
184 | tkProcedure: Result := strProcedure;
185 | Else
186 | Result := strMISSINGPROPERTYHANDLER;
187 | End
188 | End;
189 |
190 | (**
191 |
192 | This function returns the enumerate value name for the given pointer item.
193 |
194 | @precon ptrData and PropListItem must be valid.
195 | @postcon Returns the name of the enumerate value.
196 |
197 | @param ptrData as a Pointer as a constant
198 | @param PropListItem as a PPropInfo as a constant
199 | @return a String
200 |
201 | **)
202 | Class Function TIDEExplorerOLDRTTI.PropertyValueEnumerate(Const ptrData :Pointer;
203 | Const PropListItem : PPropInfo): String;
204 |
205 | Begin
206 | Result := GetEnumName(PropListItem.PropType^, GetOrdProp(TObject(ptrData), PropListItem));
207 | End;
208 |
209 | (**
210 |
211 | This function returns the value of the integer.
212 |
213 | @precon ptrData and PropListItem must be valid instances.
214 | @postcon Returns the value of the integer.
215 |
216 | @param ptrData as a Pointer as a constant
217 | @param PropListItem as a PPropInfo as a constant
218 | @return a String
219 |
220 | **)
221 | Class Function TIDEExplorerOLDRTTI.PropertyValueInteger(Const ptrData : Pointer;
222 | Const PropListItem : PPropInfo): String;
223 |
224 | Begin
225 | Result := IntToStr(GetOrdProp(TObject(ptrData), PropListItem))
226 | End;
227 |
228 | (**
229 |
230 | This function returns the memory addresses of the method.
231 |
232 | @precon ptrData and PropListItem must be valid.
233 | @postcon Returns the memory addresses of the method.
234 |
235 | @param ptrData as a Pointer as a constant
236 | @param PropListItem as a PPropInfo as a constant
237 | @return a String
238 |
239 | **)
240 | Class Function TIDEExplorerOLDRTTI.PropertyValueMethod(Const ptrData: Pointer;
241 | Const PropListItem: PPropInfo): String;
242 |
243 | ResourceString
244 | strUnassigned = '(Unassigned)';
245 |
246 | Const
247 | iDWordWidth = 8;
248 |
249 | Var
250 | Method: TMethod;
251 |
252 | Begin
253 | Method := GetMethodProp(TObject(ptrData), PropListItem);
254 | Result := '$' + IntToHex(Integer(Method.Data), iDWordWidth) + '::$' +
255 | IntToHex(Integer(Method.Code), iDWordWidth);
256 | If Result = '$00000000::$00000000' Then
257 | Result := strUnassigned;
258 | End;
259 |
260 | (**
261 |
262 | This function returns a text representation of the values that are contained in the set.
263 |
264 | @precon ptrData and PropListItem must be valid instances.
265 | @postcon Returns a text representation of the values that are contained in the set.
266 |
267 | @param ptrData as a Pointer as a constant
268 | @param PropListItem as a PPropInfo as a constant
269 | @return a String
270 |
271 | **)
272 | Class Function TIDEExplorerOLDRTTI.PropertyValueSet(Const ptrData: Pointer;
273 | Const PropListItem: PPropInfo): String;
274 |
275 | Var
276 | S: TIntegerSet;
277 | TypeInfo: PTypeInfo;
278 | j: Integer;
279 |
280 | Begin
281 | TypeInfo := GetTypeData(PropListItem.PropType^)^.CompType^;
282 | Integer(S) := GetOrdProp(TObject(ptrData), PropListItem);
283 | Result := '[';
284 | For j := 0 To SizeOf(Integer) * 8 - 1 Do
285 | If j In S Then
286 | Begin
287 | If Length(Result) <> 1 Then
288 | Result := Result + ', ';
289 | Result := Result + GetEnumName(TypeInfo, j);
290 | End;
291 | Result := Result + ']';
292 | End;
293 |
294 | End.
295 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.ProgressForm.dfm:
--------------------------------------------------------------------------------
1 | object frmDIEProgressForm: TfrmDIEProgressForm
2 | Left = 0
3 | Top = 0
4 | BorderIcons = [biSystemMenu]
5 | BorderStyle = bsSingle
6 | Caption = 'Progress'
7 | ClientHeight = 46
8 | ClientWidth = 351
9 | Color = clBtnFace
10 | Font.Charset = DEFAULT_CHARSET
11 | Font.Color = clWindowText
12 | Font.Height = -13
13 | Font.Name = 'Tahoma'
14 | Font.Style = []
15 | OldCreateOrder = False
16 | Position = poOwnerFormCenter
17 | OnCreate = FormCreate
18 | OnDestroy = FormDestroy
19 | PixelsPerInch = 96
20 | TextHeight = 16
21 | object ProgressBar: TProgressBar
22 | AlignWithMargins = True
23 | Left = 10
24 | Top = 10
25 | Width = 331
26 | Height = 26
27 | Margins.Left = 10
28 | Margins.Top = 10
29 | Margins.Right = 10
30 | Margins.Bottom = 10
31 | Align = alClient
32 | TabOrder = 0
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.ProgressForm.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains a class which represents a progress form on the screen.
4 |
5 | @Author David Hoyle
6 | @Version 1.169
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.ProgressForm;
31 |
32 | Interface
33 |
34 | {$INCLUDE CompilerDefinitions.inc}
35 |
36 | Uses
37 | Winapi.Windows,
38 | Winapi.Messages,
39 | System.SysUtils,
40 | System.Variants,
41 | System.Classes,
42 | Vcl.Graphics,
43 | Vcl.Controls,
44 | Vcl.Forms,
45 | Vcl.Dialogs,
46 | Vcl.ComCtrls;
47 |
48 | Type
49 | (** A form for displaying progress of long operations. **)
50 | TfrmDIEProgressForm = Class(TForm)
51 | ProgressBar: TProgressBar;
52 | procedure FormDestroy(Sender: TObject);
53 | procedure FormCreate(Sender: TObject);
54 | Strict Private
55 | Strict Protected
56 | Public
57 | End;
58 |
59 | Implementation
60 |
61 | {$R *.dfm}
62 |
63 | Uses
64 | {$IFDEF DEBUG}
65 | CodeSiteLogging,
66 | {$ENDIF DEBUG}
67 | ToolsAPI;
68 |
69 | (**
70 |
71 | This is an On Form Create Event Handler for the TfrmDIEProgressForm class.
72 |
73 | @precon None.
74 | @postcon In 10.2 and above, themes the form in the IDE.
75 |
76 | @param Sender as a TObject
77 |
78 | **)
79 | Procedure TfrmDIEProgressForm.FormCreate(Sender: TObject);
80 |
81 | {$IFDEF RS102}
82 | Var
83 | {$IFDEF RS104}
84 | ITS : IOTAIDEThemingServices;
85 | {$ELSE}
86 | ITS : IOTAIDEThemingServices250;
87 | {$ENDIF RS104}
88 | {$ENDIF RS102}
89 |
90 | Begin
91 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'FormCreate', tmoTiming);{$ENDIF}
92 | {$IFDEF RS102}
93 | {$IFDEF RS104}
94 | If Supports(BorlandIDEServices, IOTAIDEThemingServices, ITS) Then
95 | {$ELSE}
96 | If Supports(BorlandIDEServices, IOTAIDEThemingServices250, ITS) Then
97 | {$ENDIF RS104}
98 | If ITS.IDEThemingEnabled Then
99 | Begin
100 | ITS.RegisterFormClass(TfrmDIEProgressForm);
101 | ITS.ApplyTheme(Self);
102 | End;
103 | {$ENDIF RS102}
104 | End;
105 |
106 | (**
107 |
108 | This is an On Form Destroy Event Handler for the TfrmDIEProgressForm class.
109 |
110 | @precon None.
111 | @postcon Does nothing except used for CodeSite tracing.
112 |
113 | @nocheck EmptyMethod
114 |
115 | @param Sender as a TObject
116 |
117 | **)
118 | Procedure TfrmDIEProgressForm.FormDestroy(Sender: TObject);
119 |
120 | Begin
121 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'FormDestroy', tmoTiming); {$ENDIF}
122 | End;
123 |
124 | End.
125 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.ProgressMgr.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains a class which implements the IDIEProgressMgr interface for managing the display of
4 | progress in the application.
5 |
6 | @Author David Hoyle
7 | @Version 1.455
8 | @Date 04 Jan 2022
9 |
10 | @license
11 |
12 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
13 | browse the internals of the RAD Studio IDE.
14 |
15 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
16 |
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program. If not, see .
29 |
30 | **)
31 | Unit IDEExplorer.ProgressMgr;
32 |
33 | Interface
34 |
35 | Uses
36 | System.Classes,
37 | IDEExplorer.Interfaces,
38 | IDEExplorer.ProgressForm;
39 |
40 | Type
41 | (** This classes implements the IDIEProgressMgr interface for displaying progress. **)
42 | TDIEProgressMgr = Class(TInterfacedObject, IDIEProgressMgr)
43 | Strict Private
44 | FProgressForm : TfrmDIEProgressForm;
45 | Strict Protected
46 | Procedure Hide;
47 | Procedure Initialise(Const iSteps: Integer);
48 | Procedure Show(Const strInitMsg: String);
49 | Procedure Update(Const strMsg: String);
50 | Public
51 | Constructor Create(Const AOwner : TComponent);
52 | Destructor Destroy; Override;
53 | End;
54 |
55 | Implementation
56 |
57 | Uses
58 | {$IFDEF DEBUG}
59 | CodeSiteLogging,
60 | {$ENDIF DEBUG}
61 | Forms;
62 |
63 | (**
64 |
65 | A constructor for the TDIEProgressMgr class.
66 |
67 | @precon AOwner must be a valid instance.
68 | @postcon Creates a progress form to display the progress.
69 |
70 | @param AOwner as a TComponent as a constant
71 |
72 | **)
73 | Constructor TDIEProgressMgr.Create(Const AOwner: TComponent);
74 |
75 | Begin
76 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Create', tmoTiming);{$ENDIF}
77 | FProgressForm := TfrmDIEProgressForm.Create(AOwner);
78 | End;
79 |
80 | (**
81 |
82 | A destructor for the TDIEProgressMgr class.
83 |
84 | @precon None.
85 | @postcon Does nothing @note The form created is owned by the explorer form so destroyed with it.
86 |
87 | **)
88 | Destructor TDIEProgressMgr.Destroy;
89 |
90 | Begin
91 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Destroy', tmoTiming);{$ENDIF}
92 | Inherited Destroy;
93 | End;
94 |
95 | (**
96 |
97 | This method hides the progress.
98 |
99 | @precon None.
100 | @postcon The progress form is hidden.
101 |
102 | **)
103 | Procedure TDIEProgressMgr.Hide;
104 |
105 | Begin
106 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Hide', tmoTiming);{$ENDIF}
107 | FProgressForm.Hide;
108 | End;
109 |
110 | (**
111 |
112 | This method initialise the progress for the number of steps given.
113 |
114 | @precon iSteps needs to be 1 or greater.
115 | @postcon The progress form is initialised.
116 |
117 | @param iSteps as an Integer as a constant
118 |
119 | **)
120 | Procedure TDIEProgressMgr.Initialise(Const iSteps: Integer);
121 |
122 | ResourceString
123 | strPleaseWait = 'Please wait...';
124 |
125 | Begin
126 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Initialise', tmoTiming);{$ENDIF}
127 | FProgressForm.Caption := strPleaseWait;
128 | FProgressForm.ProgressBar.Min := 0;
129 | FProgressForm.ProgressBar.Position := 0;
130 | FProgressForm.ProgressBar.Max := iSteps;
131 | Application.ProcessMessages;
132 | End;
133 |
134 | (**
135 |
136 | This method shows the progress.
137 |
138 | @precon None.
139 | @postcon The progress form is displayed.
140 |
141 | @param strInitMsg as a String as a constant
142 |
143 | **)
144 | Procedure TDIEProgressMgr.Show(Const strInitMsg: String);
145 |
146 | Begin
147 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Show', tmoTiming);{$ENDIF}
148 | FProgressForm.Show;
149 | FProgressForm.Caption := strInitMsg;
150 | Application.ProcessMessages;
151 | End;
152 |
153 | (**
154 |
155 | This method updates the progress.
156 |
157 | @precon None.
158 | @postcon Displays the messages and increments the progress position.
159 |
160 | @param strMsg as a String as a constant
161 |
162 | **)
163 | Procedure TDIEProgressMgr.Update(Const strMsg: String);
164 |
165 | Begin
166 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Update', tmoTiming);{$ENDIF}
167 | FProgressForm.ProgressBar.Position := FProgressForm.ProgressBar.Position + 1;
168 | FProgressForm.Caption := strMsg;
169 | Application.ProcessMessages;
170 | End;
171 |
172 | End.
173 |
174 |
175 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.RTTIFunctions.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains the new RTTI code to extract information for fields, methods,
4 | properties and events for various objects pass to the single routine below.
5 |
6 | @Author David Hoyle
7 | @Version 2.898
8 | @Date 04 Jan 2022
9 |
10 | @license
11 |
12 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
13 | browse the internals of the RAD Studio IDE.
14 |
15 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
16 |
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program. If not, see .
29 |
30 | **)
31 | Unit IDEExplorer.RTTIFunctions;
32 |
33 | Interface
34 |
35 | Uses
36 | RTTI,
37 | ComCtrls,
38 | VirtualTrees,
39 | Classes,
40 | IDEEXplorer.Interfaces;
41 |
42 | Type
43 | (** A record to encapsulate the new RTTi methods. **)
44 | TIDEExplorerNEWRTTI = Record
45 | Strict Private
46 | Class Var
47 | (** A class variable to hold a single instance of an RTTI Context. **)
48 | FContext : TRttiContext;
49 | Strict Private
50 | Class Procedure ProcessRTTICoreProperty(Const C : TObject; Const P : TRTTIProperty;
51 | Const vstView : TVirtualStringTree); Static;
52 | Class Procedure ProcessRTTIEvents(Const C : TObject; Const vstEvents : TVirtualStringTree); Static;
53 | Class Procedure ProcessRTTIFields(Const C : TObject; Const vstFields : TVirtualStringTree); Static;
54 | Class Procedure ProcessRTTIMethods(Const C : TObject; Const vstMethods : TVirtualStringTree); Static;
55 | Class Procedure ProcessRTTIProperties(Const C : TObject;
56 | Const vstProperties : TVirtualStringTree); Static;
57 | Class Function ProcessValue(Const Value : TValue; Const strType : String) : String; Static;
58 | Class Function ValueToString(Const Value : TValue) : String; Static;
59 | Class Procedure ProcessCoreClass(Const vstComponents : TVirtualStringTree; Const N : PVirtualNode;
60 | Const V : TValue); Static;
61 | Public
62 | Class Constructor Create;
63 | Class Procedure ProcessObjectEvents(Const C : TObject; Const vstEvents : TVirtualStringTree;
64 | Const ProgressMgr : IDIEProgressMgr); Static;
65 | Class Procedure ProcessObjectFields(Const C : TObject; Const vstFields : TVirtualStringTree;
66 | Const ProgressMgr : IDIEProgressMgr); Static;
67 | Class Procedure ProcessObjectMethods(Const C : TObject; Const vstMethods : TVirtualStringTree;
68 | Const ProgressMgr : IDIEProgressMgr); Static;
69 | Class Procedure ProcessObjectProperties(Const C : TObject; Const vstProperties : TVirtualStringTree;
70 | Const ProgressMgr : IDIEProgressMgr); Static;
71 | Class Procedure ProcessClass(
72 | Const vstComponents : TVirtualStringTree;
73 | Const ParentNode : PVirtualNode;
74 | Const C : TObject
75 | ); Static;
76 | End;
77 |
78 | Var
79 | (** This class is used to store the addresses of all objects found so that we do not
80 | iterate though loops in the IDE when getting classes. **)
81 | FoundClasses : TList;
82 |
83 | Implementation
84 |
85 | Uses
86 | {$IFDEF DEBUG}
87 | CodeSiteLogging,
88 | {$ENDIF}
89 | SysUtils,
90 | TypInfo,
91 | Variants,
92 | Graphics,
93 | Controls,
94 | Windows,
95 | IDEExplorer.Functions,
96 | IDEExplorer.Types;
97 |
98 | ResourceString
99 | (** A resource string for RTTI Exceptions. **)
100 | strOops = '(%s): %s';
101 |
102 | Const
103 | (** This is a constant array of string to describe the different visibility aspects
104 | of class members: private, protected, public and published. **)
105 | strVisibility : Array[TMemberVisibility] Of String = (
106 | 'Private',
107 | 'Protected',
108 | 'Public',
109 | 'Published'
110 | );
111 |
112 | (**
113 |
114 | A constructor for the TIDEExplorerNEWRTTI record.
115 |
116 | @precon None.
117 | @postcon Initialises an RTTI context class variable.
118 |
119 | **)
120 | Class Constructor TIDEExplorerNEWRTTI.Create;
121 |
122 | Begin
123 | FContext := TRTTIContext.Create;
124 | End;
125 |
126 | (**
127 |
128 | This procedure is design to recursively iterate through the classes and sub classes of a given object
129 | and add them to the tree view.
130 |
131 | @precon vstComponents, ParentNode and C must be valid instances.
132 | @postcon Iterates through the classes subclasses adding them to the tree and then asking those classes
133 | for their sub-classes.
134 |
135 | @BUG Using this code on the IDE (RAD Studio 10 Seattle) causes catastrophic failures: It is
136 | assumed that when TValue extracts the value of an item it inadvertantly changes some of
137 | those objects which cause various AV and a divide by zero error. DO NOT IMPLEMENT THIS
138 | UNTIL THE REASONS FOR THE FAILURES ARE UNDERSTOOD OTHERWISE YOU WILL CRASH YOUR IDE.
139 |
140 | @param vstComponents as a TVirtualStringTree as a constant
141 | @param ParentNode as a PVirtualNode as a constant
142 | @param C as a TObject as a constant
143 |
144 | **)
145 | Class Procedure TIDEExplorerNEWRTTI.ProcessClass(
146 | Const vstComponents : TVirtualStringTree;
147 | Const ParentNode : PVirtualNode;
148 | Const C : TObject
149 | );
150 |
151 | Var
152 | Ctx : TRttiContext;
153 | T : TRttiType;
154 | F : TRttiField;
155 | P : TRttiProperty;
156 | V : TValue;
157 | N : PVirtualNode;
158 | NodeData : PDIEObjectData;
159 |
160 | Begin
161 | Exit;
162 | FoundClasses.Add(C);
163 | Ctx := TRttiContext.Create;
164 | Try
165 | T := Ctx.GetType(C.ClassType);
166 | For F In T.GetFields Do
167 | Begin
168 | OutputDebugString(PChar(F.ToString));
169 | If F.FieldType.TypeKind = tkClass Then
170 | Begin
171 | V := F.GetValue(C);
172 | N := vstComponents.AddChild(ParentNode);
173 | NodeData := vstComponents.GetNodeData(N);
174 | NodeData.FText := Format('%s.%s: %s %s', [
175 | F.Parent.Name,F.Name,
176 | F.FieldType.ToString,
177 | ValueToString(V)
178 | ]);
179 | NodeData.FImageIndex := 6;
180 | NodeData.FObject := V.AsObject;
181 | ProcessCoreClass(vstComponents, N, V);
182 | End;
183 | End;
184 | For P In T.GetProperties Do
185 | If P.PropertyType.TypeKind = tkClass Then
186 | Begin
187 | V := P.GetValue(C);
188 | N := vstComponents.AddChild(ParentNode);
189 | NodeData := vstComponents.GetNodeData(N);
190 | NodeData.FText := Format('%s.%s: %s %s', [
191 | P.Parent.Name,
192 | P.Name,
193 | P.PropertyType.ToString,
194 | ValueToString(V)
195 | ]);
196 | NodeData.FObject := V.AsObject;
197 | ProcessCoreClass(vstComponents, N, V);
198 | End;
199 | Finally
200 | Ctx.Free;
201 | End;
202 | End;
203 |
204 | (**
205 |
206 | This method processes the Value of the class item and if found to be another class, recursively
207 | processes the class.
208 |
209 | @precon vstComponents and N must be valid instances.
210 | @postcon Processes the Value of the class item and if found to be another class, recursively
211 | processes the class.
212 |
213 | @param vstComponents as a TVirtualStringTree as a constant
214 | @param N as a PVirtualNode as a constant
215 | @param V as a TValue as a constant
216 |
217 | **)
218 | Class Procedure TIDEExplorerNEWRTTI.ProcessCoreClass(
219 | Const vstComponents : TVirtualStringTree;
220 | Const N : PVirtualNode;
221 | Const V : TValue
222 | );
223 |
224 | Var
225 | iIndex: Integer;
226 |
227 | Begin
228 | If Not V.IsEmpty Then
229 | Begin
230 | iIndex := FoundClasses.IndexOf(V.AsObject);
231 | If iIndex = -1 Then
232 | ProcessClass(vstComponents, N, V.AsObject);
233 | End;
234 | End;
235 |
236 | (**
237 |
238 | This procedure processes the fields, methods, properties and events for the given object.
239 |
240 | @precon C and vstEvents must be valid instances.
241 | @postcon The fields, methods, properties and events of the object are output.
242 |
243 | @param C as a TObject as a constant
244 | @param vstEvents as a TVirtualStringTree as a constant
245 | @param ProgressMgr as an IDIEProgressMgr as a constant
246 |
247 | **)
248 | Class Procedure TIDEExplorerNEWRTTI.ProcessObjectEvents(Const C : TObject;
249 | Const vstEvents : TVirtualStringTree; Const ProgressMgr : IDIEProgressMgr);
250 |
251 | ResourceString
252 | strFindingEvents = 'Finding Events...';
253 |
254 | Begin
255 | ProgressMgr.Update(strFindingEvents);
256 | ProcessRTTIEvents(C, vstEvents);
257 | End;
258 |
259 | (**
260 |
261 | This method processed the given objects fields and adds them to the given virtual treeview.
262 |
263 | @precon C and vstFields must be valid instances.
264 | @postcon The fields of the object are added to the VTV control.
265 |
266 | @param C as a TObject as a constant
267 | @param vstFields as a TVirtualStringTree as a constant
268 | @param ProgressMgr as an IDIEProgressMgr as a constant
269 |
270 | **)
271 | Class Procedure TIDEExplorerNEWRTTI.ProcessObjectFields(Const C: TObject;
272 | Const vstFields: TVirtualStringTree; Const ProgressMgr: IDIEProgressMgr);
273 |
274 | ResourceString
275 | strFindingFields = 'Finding Fields...';
276 |
277 | Begin
278 | ProgressMgr.Update(strFindingFields);
279 | ProcessRTTIFields(C, vstFields);
280 | End;
281 |
282 | (**
283 |
284 | This method processed the given objects methods and adds them to the given virtual treeview.
285 |
286 | @precon C and vstMethods must be valid instances.
287 | @postcon The methods of the object are added to the VTV control.
288 |
289 | @param C as a TObject as a constant
290 | @param vstMethods as a TVirtualStringTree as a constant
291 | @param ProgressMgr as an IDIEProgressMgr as a constant
292 |
293 | **)
294 | Class Procedure TIDEExplorerNEWRTTI.ProcessObjectMethods(Const C: TObject;
295 | Const vstMethods: TVirtualStringTree; Const ProgressMgr: IDIEProgressMgr);
296 |
297 | ResourceString
298 | strFindingMethods = 'Finding Methods...';
299 |
300 | Begin
301 | ProgressMgr.Update(strFindingMethods);
302 | ProcessRTTIMethods(C, vstMethods);
303 | End;
304 |
305 | (**
306 |
307 | This method processed the given objects properties and adds them to the given virtual treeview.
308 |
309 | @precon C and vstProperties must be valid instances.
310 | @postcon The properties of the object are added to the VTV control.
311 |
312 | @param C as a TObject as a constant
313 | @param vstProperties as a TVirtualStringTree as a constant
314 | @param ProgressMgr as an IDIEProgressMgr as a constant
315 |
316 | **)
317 | Class Procedure TIDEExplorerNEWRTTI.ProcessObjectProperties(Const C: TObject;
318 | Const vstProperties: TVirtualStringTree; Const ProgressMgr: IDIEProgressMgr);
319 |
320 | ResourceString
321 | strFindingProperties = 'Finding Properties...';
322 |
323 | Begin
324 | ProgressMgr.Update(strFindingProperties);
325 | ProcessRTTIProperties(C, vstProperties);
326 | End;
327 |
328 | (**
329 |
330 | This procedure is called for properties and event as the output is the same they are just filtered
331 | differently. This outputs a list view item for the given property/event in the object with the
332 | following information: Scope; Fully Qualified Name; Property Type; Access; Value Type Kind; Data Size;
333 | Value.
334 |
335 | @precon C, P and View must be a valid instances.
336 | @postcon A list view item is create the property or event.
337 |
338 | @param C as a TObject as a constant
339 | @param P as a TRTTIProperty as a constant
340 | @param vstView as a TVirtualStringTree as a constant
341 |
342 | **)
343 | Class Procedure TIDEExplorerNEWRTTI.ProcessRTTICoreProperty(Const C : TObject; Const P : TRTTIProperty;
344 | Const vstView : TVirtualStringTree);
345 |
346 | (**
347 |
348 | This procedure determines the access type for the property and outputs that to the list view.
349 |
350 | @precon Item must be a valid instance.
351 | @postcon The properties access type is output.
352 |
353 | @param NodeData as a PDIEPropertyData as a constant
354 |
355 | **)
356 | Procedure PropertyAccess(Const NodeData : PDIEPropertyData);
357 |
358 | ResourceString
359 | strReadWrite = 'Read/Write';
360 | strReadonly = 'Read only';
361 | strWriteonly = 'Write only';
362 | strUnknown = '';
363 |
364 | Begin
365 | If P.IsReadAble And P.IsWritable Then
366 | NodeData.FAccess := strReadWrite
367 | Else If P.IsReadAble And Not P.IsWritable Then
368 | NodeData.FAccess := strReadonly
369 | Else If Not P.IsReadAble And P.IsWritable Then
370 | NodeData.FAccess := strWriteonly
371 | Else
372 | NodeData.FAccess := strUnknown;
373 | End;
374 |
375 | Var
376 | V : TValue;
377 | Node : PVirtualNode;
378 | NodeData : PDIEPropertyData;
379 |
380 | Begin
381 | Node := vstView.AddChild(Nil);
382 | NodeData := vstView.GetNodeData(Node);
383 | NodeData.FVisibility := strVisibility[P.Visibility];
384 | NodeData.FVisibilityIndex := Integer(P.Visibility);
385 | NodeData.FQualifiedName := P.Parent.Name + '.' + P.Name;
386 | If Assigned(P.PropertyType) Then
387 | Begin
388 | NodeData.FType := P.PropertyType.ToString;
389 | PropertyAccess(NodeData);
390 | NodeData.FKind := GetEnumName(TypeInfo(TTypeKind), Ord(P.PropertyType.TypeKind));
391 | NodeData.FImageIndex := Integer(P.PropertyType.TypeKind);
392 | NodeData.FSize := Format('%d ', [P.PropertyType.TypeSize]);
393 | End;
394 | Try
395 | If Not FatalValue(P.Name) And P.IsReadable Then
396 | Begin
397 | V := P.GetValue(C);
398 | NodeData.FObject := Nil;
399 | If P.PropertyType.TypeKind = tkClass Then
400 | NodeData.FObject := V.AsObject;
401 | If P.IsReadable Then
402 | NodeData.FValue := ProcessValue(V, P.PropertyType.ToString);
403 | End;
404 | Except
405 | On E : EInsufficientRtti Do
406 | NodeData.FValue := Format(strOops, [E.ClassName, E.Message]);
407 | End;
408 | End;
409 |
410 | (**
411 |
412 | This procedure iterates through the properties of the object and creates a list view item for each
413 | property starting with "On" (i.e. an event).
414 |
415 | @precon C, Ctx and View must be valid instances.
416 | @postcon A list view item is created for each event.
417 |
418 | @param C as a TObject as a constant
419 | @param vstEvents as a TVirtualStringTree as a constant
420 |
421 | **)
422 | Class Procedure TIDEExplorerNEWRTTI.ProcessRTTIEvents(Const C : TObject;
423 | Const vstEvents : TVirtualStringTree);
424 |
425 | Const
426 | iFirst2Chars = 2;
427 | strOn = 'on';
428 |
429 | Var
430 | T : TRTTIType;
431 | P : TRTTIProperty;
432 |
433 | Begin
434 | vstEvents.BeginUpdate;
435 | Try
436 | T := FContext.GetType(C.ClassType);
437 | For P In T.GetProperties Do
438 | If CompareText(Copy(P.Name, 1, iFirst2Chars), strOn) = 0 Then
439 | ProcessRTTICoreProperty(C, P, vstEvents);
440 | Finally
441 | vstEvents.EndUpdate;
442 | End;
443 | End;
444 |
445 | (**
446 |
447 | This procedure iterates through the properties of the given object outputting a list view item for each
448 | property containing the following information: Scope; Fully Qualified Name; Field Type; Offset of the
449 | field in the Virtual Table (I think); Value Type Kind; Data Size; Value.
450 |
451 | @precon C, Ctx and View must be a valid instances.
452 | @postcon A list view item is created for the property.
453 |
454 | @param C as a TObject as a constant
455 | @param vstFields as a TVirtualStringTree as a constant
456 |
457 | **)
458 | Class Procedure TIDEExplorerNEWRTTI.ProcessRTTIFields(Const C : TObject;
459 | Const vstFields : TVirtualStringTree);
460 |
461 | Var
462 | Node : PVirtualNode;
463 | NodeData : PDIEFieldData;
464 | AType : TRTTIType;
465 | Field : TRTTIField;
466 | Value : TValue;
467 |
468 | Begin
469 | vstFields.BeginUpdate;
470 | Try
471 | AType := FContext.GetType(C.ClassType);
472 | For Field In AType.GetFields Do
473 | Begin
474 | Node := vstFields.AddChild(Nil);
475 | NodeData := vstFields.GetNodeData(Node);
476 | NodeData.FVisibility := strVisibility[Field.Visibility];
477 | NodeData.FVisibilityIndex := Integer(Field.Visibility);
478 | NodeData.FQualifiedName := Field.Parent.Name + '.' + Field.Name;
479 | If Assigned(Field.FieldType) Then
480 | Begin
481 | NodeData.FType := Field.FieldType.ToString;
482 | NodeData.FOffset := Format('$%x', [Field.Offset]);
483 | NodeData.FKind := GetEnumName(TypeInfo(TTypeKind), Ord(Field.FieldType.TypeKind));
484 | NodeData.FImageIndex := Integer(Field.FieldType.TypeKind);
485 | NodeData.FSize := Format('%d ', [Field.FieldType.TypeSize]);
486 | End;
487 | Try
488 | Value := Field.GetValue(C);
489 | NodeData.FObject := Nil;
490 | If Field.FieldType.TypeKind = tkClass Then
491 | NodeData.FObject := Value.AsObject;
492 | NodeData.FValue := ProcessValue(Value, Field.FieldType.ToString);
493 | Except
494 | On E : EInsufficientRtti Do
495 | NodeData.FValue := Format(strOops, [E.ClassName, E.Message]);
496 | End;
497 | End;
498 | Finally
499 | vstFields.EndUpdate;
500 | End;
501 | End;
502 |
503 | (**
504 |
505 | This procedure iterates through the methods associated with the given object and output a list view
506 | item for each method showing the following information: Scope; Fully Qualified Name; Method Kind;
507 | Method Signature.
508 |
509 | @precon C, Ctx and View must be valid instances.
510 | @postcon A list view item is creates for each method.
511 |
512 | @param C as a TObject as a constant
513 | @param vstMethods as a TVirtualStringTree as a constant
514 |
515 | **)
516 | Class Procedure TIDEExplorerNEWRTTI.ProcessRTTIMethods(Const C : TObject;
517 | Const vstMethods : TVirtualStringTree);
518 |
519 | Var
520 | Node: PVirtualNode;
521 | NodeData : PDIEMethodData;
522 | AType : TRTTIType;
523 | Method : TRTTIMethod;
524 |
525 | Begin
526 | vstMethods.BeginUpdate;
527 | Try
528 | AType := FContext.GetType(C.ClassType);
529 | For Method In AType.GetMethods Do
530 | Begin
531 | Node := vstMethods.AddChild(Nil);
532 | NodeData := vstMethods.GetNodeData(Node);
533 | NodeData.FVisibility := strVisibility[Method.Visibility];
534 | NodeData.FVisibilityIndex := Integer(Method.Visibility);
535 | NodeData.FQualifiedName := Method.Parent.Name + '.' + Method.Name;
536 | Try
537 | NodeData.FType := GetEnumName(TypeInfo(TMethodKind), Ord(Method.MethodKind));
538 | NodeData.FImageIndex := Integer(tkMethod);
539 | NodeData.FSignature := Method.ToString;
540 | Except
541 | On E : EInsufficientRtti Do
542 | NodeData.FSignature := Format(strOops, [E.ClassName, E.Message]);
543 | End;
544 | End;
545 | Finally
546 | vstMethods.EndUpdate;
547 | End;
548 | End;
549 |
550 | (**
551 |
552 | This procedure iterates through the properties of the object and creates a list view item for each
553 | property not starting with "On" (i.e. an event).
554 |
555 | @precon C, Ctx and View must be valid instances.
556 | @postcon A list view item is created for each property.
557 |
558 | @param C as a TObject as a constant
559 | @param vstProperties as a TVirtualStringTree as a constant
560 |
561 | **)
562 | Class Procedure TIDEExplorerNEWRTTI.ProcessRTTIProperties(Const C : TObject;
563 | Const vstProperties : TVirtualStringTree);
564 |
565 | Const
566 | iFirst2Chars = 2;
567 | strOn = 'on';
568 |
569 | Var
570 | T : TRTTIType;
571 | P : TRTTIProperty;
572 |
573 | Begin
574 | vstProperties.BeginUpdate;
575 | Try
576 | T := FContext.GetType(C.ClassType);
577 | For P In T.GetProperties Do
578 | If CompareText(Copy(P.Name, 1, iFirst2Chars), strOn) <> 0 Then
579 | ProcessRTTICoreProperty(C, P, vstProperties);
580 | Finally
581 | vstProperties.EndUpdate;
582 | End;
583 | End;
584 |
585 | (**
586 |
587 | This procedure processes the retrieval of the value for fields and properties so that an integer return
588 | can be overridden for TColor and TCursor to return their colours, cursor names etc.
589 |
590 | @precon Item must be a valid instance.
591 | @postcon The value of the field / property is added to the list view item.
592 |
593 | @param Value as a TValue as a constant
594 | @param strType as a String as a constant
595 | @return a String
596 |
597 | **)
598 | Class Function TIDEExplorerNEWRTTI.ProcessValue(Const Value : TValue; Const strType : String) : String;
599 |
600 | Const
601 | strTColor = 'TColor';
602 | strTCursor = 'TCursor';
603 |
604 | Begin
605 | Result := ValueToString(Value);
606 | If CompareText(strType, strTColor) = 0 Then
607 | Result := ColorToString(Value.AsInteger);
608 | If CompareText(strType, strTCursor) = 0 Then
609 | Result := CursorToString(Value.AsInteger);
610 | End;
611 |
612 | (**
613 |
614 | This function does all the conversion of a TValue passed to it into a text equivalent.
615 |
616 | @precon None.
617 | @postcon A string representing the value is returned.
618 |
619 | @param Value as a TValue as a constant
620 | @return a String
621 |
622 | **)
623 | Class Function TIDEExplorerNEWRTTI.ValueToString(Const Value : TValue) : String;
624 |
625 | (**
626 |
627 | This function returns a square bracketed list of array values corresponding to the
628 | array stored in Value.
629 |
630 | @precon None.
631 | @postcon Returns a square bracketed list of array values.
632 |
633 | @return a String
634 |
635 | **)
636 | Function ArrayToString : String;
637 |
638 | Var
639 | iLength : Integer;
640 | i : Integer;
641 |
642 | Begin
643 | Result := Value.ToString;
644 | If Not Value.IsEmpty Then
645 | Begin
646 | Result := '';
647 | iLength := Value.GetArrayLength;
648 | For i := 0 To iLength - 1 Do
649 | Begin
650 | If Result <> '' Then
651 | Result := Result + ', ';
652 | Result := Result + ValueToString(Value.GetArrayElement(i));
653 | End;
654 | Result := '[' + Result + ']';
655 | End;
656 | End;
657 |
658 | (**
659 |
660 | This function returns the ordinal value of the character and if the character is
661 | greater than 32 also appends the character.
662 |
663 | @precon None.
664 | @postcon Returns an ordinal value for the character.
665 |
666 | @return a String
667 |
668 | **)
669 | Function CharAsString : String;
670 |
671 | Const
672 | iSpaceChar = 32;
673 |
674 | Var
675 | iOrd : Integer;
676 |
677 | Begin
678 | iOrd := Value.AsOrdinal;
679 | Result := '#' + IntToStr(iOrd);
680 | If iOrd >= iSpaceChar Then
681 | Result := Result + ' (' + Chr(iOrd) + ')';
682 | End;
683 |
684 | (**
685 |
686 | This function return the value of the method is assigned else returns (unassigned).
687 |
688 | @precon None.
689 | @postcon Return the value of the method is assigned else returns (unassigned).
690 |
691 | @return a String
692 |
693 | **)
694 | Function MethodAsString : String;
695 |
696 | ResourceString
697 | strUnassigned = '(unassigned)';
698 |
699 | Begin
700 | If Value.IsEmpty Then
701 | Result := strUnassigned
702 | Else
703 | Result := Value.ToString;
704 | End;
705 |
706 | ResourceString
707 | strUnknown = '';
708 | strNotHandled = '';
709 |
710 | Begin
711 | Case Value.TypeInfo.Kind Of
712 | tkUnknown: Result := strUnknown;
713 | tkInteger: Result := Value.ToString;
714 | tkChar: Result := CharAsString;
715 | tkEnumeration: Result := Value.ToString; // Boolean here
716 | tkFloat: Result := Format('#,##0.000', [Value.AsExtended]);
717 | tkString: Result := '''' + Value.AsString + '''';
718 | tkSet: Result := Value.ToString;
719 | tkClass: Result := Value.ToString;
720 | tkMethod: Result := MethodAsString;
721 | tkWChar: Result := CharAsString;
722 | tkLString: Result := '''' + Value.ToString + '''';
723 | tkWString: Result := '''' + Value.ToString + '''';
724 | tkVariant: Result := VarToStr(Value.AsVariant) + ' (' + VarTypeAsText(Value.AsVariant) + ')';
725 | tkArray: Result := ArrayToString;
726 | tkRecord: Result := Value.ToString;
727 | tkInterface: Result := Value.ToString;
728 | tkInt64: Result := IntToStr(Value.AsInt64);
729 | tkDynArray: Result := ArrayToString;
730 | tkUString: Result := '''' + Value.ToString + '''';
731 | tkClassRef: Result := Value.ToString;
732 | tkPointer: Result := Value.ToString;
733 | tkProcedure: Result := MethodAsString;
734 | Else
735 | Result := strNotHandled;
736 | End;
737 | End;
738 |
739 | (** This initialization section is used to create a global list of objects to store
740 | instances of found classes fir the ProcessClass method above. Its to prevent loops. **)
741 | Initialization
742 | FoundClasses := TList.Create;
743 | (** Frees the Found Classes list. **)
744 | Finalization
745 | FoundClasses.Free;
746 | End.
747 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.ResourceStrings.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains resource strings for use throughout the plug-in.
4 |
5 | @Author David Hoyle
6 | @Version 1.119
7 | @Date 04 Jun 2020
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.ResourceStrings;
31 |
32 | Interface
33 |
34 | ResourceString
35 | (** A resource string for to be displayed on the splash screen. **)
36 | strSplashScreenName = 'IDE Explorer %d.%d%s for %s';
37 | {$IFDEF DEBUG}
38 | (** A resource string for the build information on the splash screen **)
39 | strSplashScreenBuild = 'David Hoyle (c) 2020 License GNU GPL3 (DEBUG Build %d.%d.%d.%d)';
40 | {$ELSE}
41 | (** A resource string for the build information on the splash screen **)
42 | strSplashScreenBuild = 'David Hoyle (c) 2020 License GNU GPL3 (Build %d.%d.%d.%d)';
43 | {$ENDIF DEBUG}
44 |
45 | Implementation
46 |
47 | End.
48 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.SplashScreen.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains code to install a splash screen entry into the RAD Studio IDE.
4 |
5 | @Author David Hoyle
6 | @Version 1.203
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.SplashScreen;
31 |
32 | Interface
33 |
34 | Procedure InstallSplashScreen;
35 |
36 | Implementation
37 |
38 | {$INCLUDE CompilerDefinitions.inc}
39 |
40 | Uses
41 | ToolsAPI,
42 | SysUtils,
43 | DateUtils,
44 | Forms,
45 | {$IFDEF RS110}
46 | Graphics,
47 | {$ELSE}
48 | Windows,
49 | {$ENDIF RS110}
50 | IDEExplorer.Types,
51 | IDEExplorer.Functions,
52 | IDEExplorer.Constants,
53 | IDEExplorer.ResourceStrings;
54 |
55 | (**
56 |
57 | This method installs a splash screen entry into the RAD Studio IDE splash screen.
58 |
59 | @precon None.
60 | @postcon A splash screen entry is added and displayed on the IDE splash screen.
61 |
62 | **)
63 | Procedure InstallSplashScreen;
64 |
65 | Const
66 | {$IFDEF D2005}
67 | strSplashScreenIcon = 'IDEExplorerSplashScreenBitMap48x48';
68 | {$ELSE}
69 | strSplashScreenIcon = 'IDEExplorerSplashScreenBitMap24x24';
70 | {$ENDIF}
71 |
72 | Var
73 | VerInfo : TVersionInfo;
74 | SSS : IOTASplashScreenServices;
75 | {$IFDEF RS110}
76 | SplashScreenBitMap : TBitMap;
77 | {$ELSE}
78 | bmSplashScreen : HBITMAP;
79 | {$ENDIF}
80 |
81 | Begin
82 | If Supports(SplashScreenServices, IOTASplashScreenServices, SSS) Then
83 | Begin
84 | BuildNumber(VerInfo);
85 | {$IFDEF RS110}
86 | SplashScreenBitMap := TBitMap.Create;
87 | Try
88 | SplashScreenBitMap.LoadFromResourceName(hINstance, strSplashScreenIcon);
89 | SSS.AddPluginBitmap(
90 | Format(strSplashScreenName, [VerInfo.iMajor, VerInfo.iMinor, Copy(strRevision, VerInfo.iBugFix + 1, 1), Application.Title]),
91 | [SplashScreenBitMap],
92 | {$IFDEF DEBUG} True {$ELSE} False {$ENDIF},
93 | Format(strSplashScreenBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild])
94 | );
95 | Finally
96 | SplashScreenBitMap.Free;
97 | End;
98 | {$ELSE}
99 | bmSplashScreen := LoadBitmap(hInstance, strSplashScreenIcon);
100 | SSS.AddPluginBitmap(
101 | Format(strSplashScreenName, [VerInfo.iMajor, VerInfo.iMinor, Copy(strRevision, VerInfo.iBugFix + 1, 1), Application.Title]),
102 | bmSplashScreen,
103 | {$IFDEF DEBUG} True {$ELSE} False {$ENDIF},
104 | Format(strSplashScreenBuild, [VerInfo.iMajor, VerInfo.iMinor, VerInfo.iBugfix, VerInfo.iBuild])
105 | );
106 | {$ENDIF RS110}
107 | End;
108 | End;
109 |
110 | End.
111 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.Types.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains simple types for use throughout the plug-in.
4 |
5 | @Author David Hoyle
6 | @Version 1.433
7 | @Date 04 Jan 2022
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 | Unit IDEExplorer.Types;
31 |
32 | Interface
33 |
34 | Uses
35 | System.Classes,
36 | System.TypInfo;
37 |
38 | Type
39 | (** A record to store the version information for the BPL. **)
40 | TVersionInfo = Record
41 | iMajor: Integer;
42 | iMinor: Integer;
43 | iBugfix: Integer;
44 | iBuild: Integer;
45 | End;
46 |
47 | (** A record to describe the data in the Explorer treeview. **)
48 | TDIEObjectData = Record
49 | FText : String;
50 | FObject : TObject;
51 | FImageIndex : Integer;
52 | End;
53 | (** A pointer to the above structure. **)
54 | PDIEObjectData = ^TDIEObjectData;
55 |
56 | (** A record to describe the data in the Fields treeview. **)
57 | TDIEFieldData = Record
58 | FVisibility : String;
59 | FVisibilityIndex : Integer;
60 | FQualifiedName : String;
61 | FType : String;
62 | FOffset : String;
63 | FKind : String;
64 | FImageIndex : Integer;
65 | FSize : String;
66 | FValue : String;
67 | FObject : TObject;
68 | End;
69 | (** A pointer to the above structure. **)
70 | PDIEFieldData = ^TDIEFieldData;
71 |
72 | (** A record to describe the data in the Methods treeview. **)
73 | TDIEMethodData = Record
74 | FVisibility : String;
75 | FVisibilityIndex : Integer;
76 | FQualifiedName : String;
77 | FType : String;
78 | FImageIndex : Integer;
79 | FSignature : String;
80 | End;
81 | (** A pointer to the above structure. **)
82 | PDIEMethodData = ^TDIEMethodData;
83 |
84 | (** A record to describe the data in the Property treeview. **)
85 | TDIEPropertyData = Record
86 | FVisibility : String;
87 | FVisibilityIndex : Integer;
88 | FQualifiedName : String;
89 | FType : String;
90 | FAccess : String;
91 | FKind : String;
92 | FImageIndex : Integer;
93 | FSize : String;
94 | FValue : String;
95 | FObject : TObject;
96 | End;
97 | (** A pointer to the above structure. **)
98 | PDIEPropertyData = ^TDIEPropertyData;
99 |
100 | (** A record to describe the data in the Property treeview. **)
101 | TDIEHierarchyData = Record
102 | FQualifiedName : String;
103 | FImageIndex : Integer;
104 | End;
105 | (** A pointer to the above structure. **)
106 | PDIEHierarchyData = ^TDIEHierarchyData;
107 |
108 | (** A record to describe the data in the Property treeview. **)
109 | TDIEOLDPropertyData = Record
110 | FQualifiedName : String;
111 | FType : String;
112 | FKind : String;
113 | FImageIndex : Integer;
114 | FValue : String;
115 | End;
116 | (** A pointer to the above structure. **)
117 | PDIEOLDPropertyData = ^TDIEOLDPropertyData;
118 |
119 | Implementation
120 |
121 | End.
122 |
--------------------------------------------------------------------------------
/Source/IDEExplorer.Wizard.pas:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | This module contains a Delphi IDE wizard that displays a tree view of the
4 | Delphi IDEs published interface.
5 |
6 | @Date 04 Jun 2020
7 | @Version 2.170
8 | @Author David Hoyle
9 |
10 | @license
11 |
12 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
13 | browse the internals of the RAD Studio IDE.
14 |
15 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
16 |
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program. If not, see .
29 |
30 | **)
31 | Unit IDEExplorer.Wizard;
32 |
33 | Interface
34 |
35 | Uses
36 | Windows,
37 | Dialogs,
38 | Classes,
39 | ToolsAPI,
40 | Menus;
41 |
42 | {$INCLUDE CompilerDefinitions.inc}
43 |
44 | Type
45 | (** This is a Wizard/Menu Wizard to implement a simply menu under the IDEs help. **)
46 | TDGHIDEExplorer = Class(TNotifierObject, IOTAWizard, IOTAMenuWizard)
47 | Strict Private
48 | FAboutBoxIndex : Integer;
49 | Strict Protected
50 | Public
51 | Constructor Create;
52 | Destructor Destroy; Override;
53 | // IOTAWizard
54 | Procedure Execute;
55 | Function GetIDString : String;
56 | Function GetName : String;
57 | Function GetState : TWizardState;
58 | // IOTAMenuWizard
59 | Function GetMenuText: string;
60 | End;
61 |
62 | Procedure Register;
63 | Function InitWizard(Const BorlandIDEServices : IBorlandIDEServices; RegisterProc : TWizardRegisterProc;
64 | var Terminate: TWizardTerminateProc) : Boolean; StdCall;
65 |
66 | Exports
67 | InitWizard Name WizardEntryPoint;
68 |
69 | Implementation
70 |
71 | Uses
72 | {$IFDEF DEBUG}
73 | CodeSiteLogging,
74 | {$ENDIF DEBUG}
75 | SysUtils,
76 | Forms,
77 | IDEExplorer.SplashScreen,
78 | IDEExplorer.ExplorerForm,
79 | IDEExplorer.Functions,
80 | IDEExplorer.Types,
81 | IDEExplorer.Constants,
82 | IDEExplorer.ResourceStrings,
83 | IDEExplorer.AboutBox;
84 |
85 | (**
86 |
87 | This is a procedure to initialising the wizard interface when loading as a DLL wizard.
88 |
89 | @precon None.
90 | @postcon Initialises the wizard.
91 |
92 | @nocheck MissingCONSTInParam
93 | @nohint Terminate
94 |
95 | @param BorlandIDEServices as an IBorlandIDEServices as a constant
96 | @param RegisterProc as a TWizardRegisterProc
97 | @param Terminate as a TWizardTerminateProc as a reference
98 | @return a Boolean
99 |
100 | **)
101 | Function InitWizard(Const BorlandIDEServices : IBorlandIDEServices;
102 | RegisterProc : TWizardRegisterProc;
103 | var Terminate: TWizardTerminateProc) : Boolean; StdCall; //FI:O804
104 |
105 | Begin
106 | {$IFDEF CODESITE}CodeSite.TraceMethod('InitWizard', tmoTiming);{$ENDIF}
107 | Result := Assigned(BorlandIDEServices);
108 | If Result Then
109 | RegisterProc(TDGHIDEExplorer.Create);
110 | End;
111 |
112 | (**
113 |
114 | This method registers the wizard with the Delphi IDE when it is loaded.
115 |
116 | @precon None.
117 | @postcon The wizard is registered with the IDE so that the IDE maintains the live of
118 | the wizard and destroys it on unloading.
119 |
120 | **)
121 | Procedure Register;
122 |
123 | Begin
124 | {$IFDEF CODESITE}CodeSite.TraceMethod('Register', tmoTiming);{$ENDIF}
125 | RegisterPackageWizard(TDGHIDEExplorer.Create);
126 | End;
127 |
128 | { TDGHIDEExplorer Class Methods }
129 |
130 | (**
131 |
132 | This is the constructor method for the TDGHIDEExplorer class.
133 |
134 | @precon None.
135 | @postcon None.
136 |
137 | **)
138 | Constructor TDGHIDEExplorer.Create;
139 |
140 | Begin
141 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Create', tmoTiming);{$ENDIF}
142 | Inherited Create;
143 | InstallSplashScreen;
144 | FAboutBoxIndex := AddAboutBoxEntry;
145 | End;
146 |
147 | (**
148 |
149 | This is the destructor method for the TDGHIDEExplorer class.
150 |
151 | @precon None.
152 | @postcon None.
153 |
154 | **)
155 | Destructor TDGHIDEExplorer.Destroy;
156 |
157 | Begin
158 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Destroy', tmoTiming);{$ENDIF}
159 | RemoveAboutBoxEntry(FAboutBoxIndex);
160 | Inherited Destroy;
161 | End;
162 |
163 | (**
164 |
165 | This method creates and displays the IDE Explorer form.
166 |
167 | @precon None.
168 | @postcon the IDE Explorer is displayed in Modal form.
169 |
170 | **)
171 | Procedure TDGHIDEExplorer.Execute;
172 |
173 | Begin
174 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'Execute', tmoTiming);{$ENDIF}
175 | TDGHIDEExplorerForm.Execute;
176 | End;
177 |
178 | (**
179 |
180 | This is a getter method for the IDString property.
181 |
182 | @precon None.
183 | @postcon Returns the ID String for the wizard.
184 |
185 | @return a String
186 |
187 | **)
188 | Function TDGHIDEExplorer.GetIDString : String;
189 |
190 | Const
191 | strDGHIDEExplorer = '.DGH IDE Explorer';
192 |
193 | Begin
194 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'GetIDString', tmoTiming);{$ENDIF}
195 | Result := strDGHIDEExplorer;
196 | End;
197 |
198 | (**
199 |
200 | This method returns the Menu Text to appear in the Help menu of the IDE.
201 |
202 | @precon None.
203 | @postcon Returns the help menu text.
204 |
205 | @return a String
206 |
207 | **)
208 | Function TDGHIDEExplorer.GetMenuText: String;
209 |
210 | ResourceString
211 | strIDEExplorer = 'IDE Explorer';
212 |
213 | Begin
214 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'GetMenuText', tmoTiming);{$ENDIF}
215 | Result := strIDEExplorer;
216 | End;
217 |
218 | (**
219 |
220 | This is a getter method for the Name property.
221 |
222 | @precon None.
223 | @postcon Returns the name of the wizard.
224 |
225 | @return a String
226 |
227 | **)
228 | Function TDGHIDEExplorer.GetName : String;
229 |
230 | Const
231 | strDGHIDEExplorer = 'DGH IDE Explorer';
232 |
233 | Begin
234 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'GetName', tmoTiming);{$ENDIF}
235 | Result := strDGHIDEExplorer;
236 | End;
237 |
238 | (**
239 |
240 | This is a getter method for the State property.
241 |
242 | @precon None.
243 | @postcon Returns the state enabled.
244 |
245 | @return a TWizardState
246 |
247 | **)
248 | Function TDGHIDEExplorer.GetState: TWizardState;
249 |
250 | Begin
251 | {$IFDEF CODESITE}CodeSite.TraceMethod(Self, 'GetState', tmoTiming);{$ENDIF}
252 | Result := [wsEnabled];
253 | End;
254 |
255 | End.
256 |
257 |
--------------------------------------------------------------------------------
/Source/LibrarySuffixes.inc:
--------------------------------------------------------------------------------
1 | (**
2 |
3 | An include unit to define library suffixes for all the version of RAD Studio.
4 |
5 | @Version 1.131
6 | @Date 04 Jan 2022
7 | @Author David Hoyle
8 |
9 | @license
10 |
11 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
12 | browse the internals of the RAD Studio IDE.
13 |
14 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
15 |
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 |
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 | GNU General Public License for more details.
25 |
26 | You should have received a copy of the GNU General Public License
27 | along with this program. If not, see .
28 |
29 | **)
30 |
31 | {$IFDEF RS110}
32 | {$LIBSUFFIX 'RS110'}
33 | {$ELSE}
34 | {$IFDEF RS104}
35 | {$LIBSUFFIX 'RS104'}
36 | {$ELSE}
37 | {$IFDEF RS103}
38 | {$LIBSUFFIX 'RS103'}
39 | {$ELSE}
40 | {$IFDEF RS102}
41 | {$LIBSUFFIX 'RS102'}
42 | {$ELSE}
43 | {$IFDEF RS101}
44 | {$LIBSUFFIX 'RS101'}
45 | {$ELSE}
46 | {$IFDEF RS100}
47 | {$LIBSUFFIX 'RS100'}
48 | {$ELSE}
49 | {$IFDEF DXE80}
50 | {$LIBSUFFIX 'XE8'}
51 | {$ELSE}
52 | {$IFDEF DXE70}
53 | {$LIBSUFFIX 'XE7'}
54 | {$ELSE}
55 | {$IFDEF DXE60}
56 | {$LIBSUFFIX 'XE6'}
57 | {$ELSE}
58 | {$IFDEF DXE50}
59 | {$LIBSUFFIX 'XE5'}
60 | {$ELSE}
61 | {$IFDEF DXE40}
62 | {$LIBSUFFIX 'XE4'}
63 | {$ELSE}
64 | {$IFDEF DXE30}
65 | {$LIBSUFFIX 'XE3'}
66 | {$ELSE}
67 | {$IFDEF DXE20}
68 | {$LIBSUFFIX 'XE2'}
69 | {$ELSE}
70 | {$IFDEF DXE00}
71 | {$LIBSUFFIX 'XE'}
72 | {$ELSE}
73 | {$IFDEF D2010}
74 | {$LIBSUFFIX '2010'}
75 | {$ELSE}
76 | {$IFDEF D2009}
77 | {$LIBSUFFIX '2009'}
78 | {$ELSE}
79 | {$IFDEF D2007}
80 | {$LIBSUFFIX '2007'}
81 | {$ELSE}
82 | {$IFDEF D2006}
83 | {$LIBSUFFIX '2006'}
84 | {$ELSE}
85 | {$MESSAGE ERROR 'The Condition Definitions need to be updated!!!!!'}
86 | {$ENDIF}
87 | {$ENDIF}
88 | {$ENDIF}
89 | {$ENDIF}
90 | {$ENDIF}
91 | {$ENDIF}
92 | {$ENDIF}
93 | {$ENDIF}
94 | {$ENDIF}
95 | {$ENDIF}
96 | {$ENDIF}
97 | {$ENDIF}
98 | {$ENDIF}
99 | {$ENDIF}
100 | {$ENDIF}
101 | {$ENDIF}
102 | {$ENDIF}
103 | {$ENDIF}
104 |
105 |
--------------------------------------------------------------------------------
/SplashScreenIcon.RC:
--------------------------------------------------------------------------------
1 | /**
2 |
3 | This is a Windows Resource File which generates a Splash Screen Icon for the
4 | RAD Studio IDE.
5 |
6 | @Author David Hoyle
7 | @Version 1.098
8 | @Date 04 Jun 2020
9 |
10 | @license
11 |
12 | IDE Explorer - an Open Tools API plug-in for RAD Studio which allows you to
13 | browse the internals of the RAD Studio IDE.
14 |
15 | Copyright (C) 2020 David Hoyle (https://github.com/DGH2112/Delphi-IDE-Explorer)
16 |
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program. If not, see .
29 |
30 | **/
31 | IDEExplorerSplashScreenBitMap24x24 BITMAP "Icons\New IDE Explorer 24x24 Icon.bmp"
32 | IDEExplorerSplashScreenBitMap48x48 BITMAP "Icons\New IDE Explorer 48x48 Icon.bmp"
33 |
34 |
--------------------------------------------------------------------------------
/SplashScreenIcon.RES:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DGH2112/Delphi-IDE-Explorer/094fc8df6e8c927259994e0e9ba524a559102919/SplashScreenIcon.RES
--------------------------------------------------------------------------------