├── .gitignore ├── .gitmodules ├── Code └── DDevExtensions │ ├── Bin │ ├── Changes.txt │ ├── Readme.txt │ └── Version.txt │ ├── D_D102 │ ├── DDevExtensions.dpr │ ├── DDevExtensions.dproj │ └── DDevExtensions.groupproj │ ├── D_D103 │ ├── DDevExtensions.dpr │ ├── DDevExtensions.dproj │ └── DDevExtensions.groupproj │ ├── D_D104 │ ├── DDevExtensions.dpr │ ├── DDevExtensions.dproj │ └── DDevExtensions.groupproj │ ├── D_D110 │ ├── DDevExtensions.dpr │ ├── DDevExtensions.dproj │ └── DDevExtensions.groupproj │ ├── D_D120 │ ├── DDevExtensions.dpr │ ├── DDevExtensions.dproj │ └── DDevExtensions.groupproj │ ├── DeleteIDEFiles.bat │ ├── Doc │ ├── Features.docx │ └── StartParameters.txt │ ├── Installer │ ├── DDevExtensionsReg.dpr │ ├── DDevExtensionsReg.dproj │ ├── DDevExtensionsReg.res │ ├── InstallDDevExtensions_Icon.ico │ ├── Main.dfm │ └── Main.pas │ ├── Source │ ├── AppConsts.pas │ ├── CompileBackup │ │ ├── FrmeOptionPageCompileBackup.dfm │ │ └── FrmeOptionPageCompileBackup.pas │ ├── CompileProgress │ │ ├── CompileProgress.pas │ │ ├── CompilerClearOtherStates.pas │ │ ├── FrmSwitchToModuleProject.dfm │ │ ├── FrmSwitchToModuleProject.pas │ │ ├── FrmeOptionPageCompilerProgress.dfm │ │ ├── FrmeOptionPageCompilerProgress.pas │ │ └── NativeProgressForm.pas │ ├── CompilerEnhancements │ │ ├── FrmeOptionPageCompilerEnhancements.dfm │ │ └── FrmeOptionPageCompilerEnhancements.pas │ ├── ComponentManager.pas │ ├── ComponentSelector │ │ ├── ComponentSelector.pas │ │ ├── FrmeOptionPageComponentSelector.dfm │ │ └── FrmeOptionPageComponentSelector.pas │ ├── CtrlUtils.pas │ ├── DSUFeatures │ │ ├── DSUFeatures.pas │ │ ├── DisableAlphaSortClassCompletion.pas │ │ ├── FrmeOptionPageDSUFeatures.dfm │ │ ├── FrmeOptionPageDSUFeatures.pas │ │ └── StrucViewSearch.pas │ ├── Debugger │ │ └── StepIntoSkip │ │ │ └── DbgStepIntoSkip.pas │ ├── DelphiExtension.inc │ ├── DtmImages.dfm │ ├── DtmImages.pas │ ├── EditPopupCtrl.pas │ ├── Editor │ │ ├── CodeInsightHandling.pas │ │ ├── DocModuleHandler.pas │ │ ├── FocusEditor.pas │ │ ├── FrmReloadFiles.dfm │ │ └── FrmReloadFiles.pas │ ├── ExcelExport │ │ ├── FrmExcelExport.dfm │ │ └── FrmExcelExport.pas │ ├── FileCleaner │ │ ├── FrmeOptionPageFileCleaner.dfm │ │ └── FrmeOptionPageFileCleaner.pas │ ├── FileSelector │ │ ├── FrmFileSelector.dfm │ │ └── FrmFileSelector.pas │ ├── FocusEditor │ │ └── FocusEditor.pas │ ├── FormDesignerHelpers │ │ ├── FrmeOptionPageFormDesigner.dfm │ │ ├── FrmeOptionPageFormDesigner.pas │ │ ├── GuideLinesHelper.pas │ │ ├── LabelMarginHelper.pas │ │ └── RemoveExplicitProperty.pas │ ├── FrmDDevExtOptions.dfm │ ├── FrmDDevExtOptions.pas │ ├── FrmeBase.dfm │ ├── FrmeBase.pas │ ├── IDEMenuHandler │ │ └── IDEMenuHandler.pas │ ├── Icon24x24.bmp │ ├── Icon32x32.bmp │ ├── Images │ │ ├── DDevExtensionsLogo.bmp │ │ ├── DDevExtensionsLogo.svg │ │ ├── DDevExtensionsLogoBlack.bmp │ │ ├── DDevExtensionsLogoWhite.bmp │ │ ├── DropDown.bmp │ │ ├── LeftArrow.bmp │ │ ├── Modified.bmp │ │ ├── imlFilter.bmp │ │ └── imlIcons.bmp │ ├── Keybindings │ │ ├── FrmeOptionPageKeybindings.dfm │ │ └── FrmeOptionPageKeybindings.pas │ ├── Main.pas │ ├── OldPalette │ │ ├── ComponentPanel.pas │ │ ├── ComponentPanel.res │ │ ├── FrmeOptionPageOldPalette.dfm │ │ ├── FrmeOptionPageOldPalette.pas │ │ ├── OldPalette.dfm │ │ └── OldPalette.pas │ ├── PluginConfig.pas │ ├── ProjectSettings │ │ ├── FrmProjectSettingManageSettings.dfm │ │ ├── FrmProjectSettingManageSettings.pas │ │ ├── FrmProjectSettingsEditOptions.dfm │ │ ├── FrmProjectSettingsEditOptions.pas │ │ ├── FrmProjectSettingsSetVersioninfo.dfm │ │ ├── FrmProjectSettingsSetVersioninfo.pas │ │ ├── ProjectSettings.pas │ │ └── ProjectSettingsData.pas │ ├── RegisterPlugins.pas │ ├── Splash.pas │ ├── Splash.res │ ├── StartParameterManager │ │ ├── StartParameterClasses.pas │ │ ├── StartParameterCtrl.pas │ │ └── StartParameterManagerReg.pas │ ├── StartParameterTeam │ │ ├── FrmeOptionPageStartParameterTeam.dfm │ │ └── FrmeOptionPageStartParameterTeam.pas │ ├── TaskbarIntf.pas │ ├── UnitSelector │ │ ├── FrmeOptionPageUnitSelector.dfm │ │ └── FrmeOptionPageUnitSelector.pas │ ├── VirtTreeHandler.pas │ └── version.inc │ ├── Version.rc │ ├── Version.res │ ├── build.bat │ ├── clean.bat │ └── version.bat ├── CompileInterceptor ├── Bin │ ├── CompileInterceptor.dll │ └── CompileInterceptorW.dll ├── Example │ ├── ExampleCompileInterceptor.cfg │ ├── ExampleCompileInterceptor.dof │ ├── ExampleCompileInterceptor.dpr │ └── ExampleCompileInterceptor.res ├── Source │ ├── CompileInterceptor.cfg │ ├── CompileInterceptor.dof │ ├── CompileInterceptor.inc │ ├── CompileInterceptorW.dpr │ ├── CompileInterceptorW.dproj │ ├── CompileInterceptorW.res │ ├── CompileInterceptorW_Icon.ico │ ├── CompilerHooks.pas │ ├── FileStreams.pas │ ├── IdeDllNames.pas │ ├── InterceptImpl.pas │ ├── InterceptIntf.pas │ ├── InterceptLoader.pas │ └── ToolsAPIIntf.pas ├── build.bat └── buildAnsi.bat ├── LICENSE ├── README.md ├── Shared ├── FileStreams.pas ├── Hooking.pas ├── IDE │ ├── FrmBase.dfm │ ├── FrmBase.pas │ ├── HtHint.pas │ ├── IDEHooks.pas │ ├── IDENotifiers.pas │ ├── IDEUtils.pas │ ├── ModuleData.pas │ ├── Options │ │ ├── FrmOptions.dfm │ │ ├── FrmOptions.pas │ │ ├── FrmTreePages.dfm │ │ └── FrmTreePages.pas │ ├── ProjectData.pas │ ├── ProjectResource.pas │ ├── ToolsAPIHelpers.pas │ └── UnitVersionInfo.pas ├── ImportHooking.pas ├── PascalParser │ ├── DelphiDesignerParser.pas │ ├── DelphiExpr.pas │ ├── DelphiLexer.pas │ ├── DelphiParser.inc │ ├── DelphiParserContainers.pas │ └── DelphiPreproc.pas └── Xml │ ├── SimpleXmlDoc.pas │ ├── SimpleXmlImport.pas │ └── SimpleXmlIntf.pas └── Tools └── LinkMapFile └── ReadMe.md /.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 | *.cfg 50 | *.hpp 51 | *Resource.rc 52 | 53 | # Delphi local files (user-specific info) 54 | *.local 55 | *.identcache 56 | *.projdata 57 | *.tvsconfig 58 | *.dsk 59 | 60 | # Delphi history and backups 61 | __history/ 62 | __recovery/ 63 | *.~* 64 | 65 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi) 66 | *.stat 67 | 68 | # Boss dependency manager vendor folder https://github.com/HashLoad/boss 69 | modules/ 70 | 71 | # Newer Delphi Versions create the *.res files in the build script 72 | *.res 73 | *.zip -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Code/DDevExtensions/jedi"] 2 | path = Code/DDevExtensions/jedi 3 | url = https://github.com/project-jedi/jedi.git 4 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Bin/Readme.txt: -------------------------------------------------------------------------------- 1 | DDevExtensions 2 | ============== 3 | 4 | (C) 2006-2022 Andreas Hausladen 5 | Andreas.Hausladen@gmx.de 6 | https://www.idefixpack.de/ddev 7 | 8 | DDevExtensions adds new features to RAD Studio. 9 | 10 | 11 | === How to install === 12 | 13 | Simply start the DDevExtensionsReg.exe. 14 | 15 | This will copy files to $(APPDATA)\DDevExtensions and it registers the expert DLLs 16 | in the registry. 17 | 18 | 19 | === How to uninstall === 20 | 21 | Start the InstallDDevExtensions.exe and press the button. 22 | 23 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Bin/Version.txt: -------------------------------------------------------------------------------- 1 | DDevExtensions Version 2.90 2 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D102/DDevExtensions.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {DC66123B-00C0-4588-8B45-BAAB3894C9D2} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D103/DDevExtensions.dpr: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2011 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | library DDevExtensions; 10 | 11 | {$WEAKLINKRTTI ON} 12 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 13 | 14 | {$LIBSUFFIX 'D103'} 15 | 16 | {$I ..\Source\DelphiExtension.inc} 17 | 18 | uses 19 | Windows, 20 | SysUtils, 21 | Classes, 22 | Forms, 23 | Graphics, 24 | StdCtrls, 25 | ExtCtrls, 26 | ToolsAPI, 27 | Dialogs, 28 | Main in '..\Source\Main.pas', 29 | AppConsts in '..\Source\AppConsts.pas', 30 | Splash in '..\Source\Splash.pas', 31 | ComponentManager in '..\Source\ComponentManager.pas', 32 | NativeProgressForm in '..\Source\CompileProgress\NativeProgressForm.pas', 33 | CompileProgress in '..\Source\CompileProgress\CompileProgress.pas', 34 | FrmProjectSettingsSetVersioninfo in '..\Source\ProjectSettings\FrmProjectSettingsSetVersioninfo.pas' {FormProjectSettingsSetVersioninfo}, 35 | IDEMenuHandler in '..\Source\IDEMenuHandler\IDEMenuHandler.pas', 36 | DtmImages in '..\Source\DtmImages.pas' {DataModuleImages: TDataModule}, 37 | FrmeOptionPageCompilerProgress in '..\Source\CompileProgress\FrmeOptionPageCompilerProgress.pas' {FrameOptionPageCompilerProgress: TFrame}, 38 | CtrlUtils in '..\Source\CtrlUtils.pas', 39 | FrmExcelExport in '..\Source\ExcelExport\FrmExcelExport.pas' {FormExcelExport}, 40 | FrmeOptionPageUnitSelector in '..\Source\UnitSelector\FrmeOptionPageUnitSelector.pas' {FrameOptionPageUnitSelector: TFrame}, 41 | FrmeOptionPageKeybindings in '..\Source\Keybindings\FrmeOptionPageKeybindings.pas' {FrameOptionPageKeybindings: TFrame}, 42 | PluginConfig in '..\Source\PluginConfig.pas', 43 | FrmeOptionPageFileCleaner in '..\Source\FileCleaner\FrmeOptionPageFileCleaner.pas' {FrameOptionPageFileCleaner: TFrame}, 44 | FrmeOptionPageCompileBackup in '..\Source\CompileBackup\FrmeOptionPageCompileBackup.pas' {FrameOptionPageCompileBackup: TFrame}, 45 | RegisterPlugins in '..\Source\RegisterPlugins.pas', 46 | LabelMarginHelper in '..\Source\FormDesignerHelpers\LabelMarginHelper.pas', 47 | FrmeOptionPageFormDesigner in '..\Source\FormDesignerHelpers\FrmeOptionPageFormDesigner.pas' {FrameOptionPageFormDesigner: TFrame}, 48 | FrmeBase in '..\Source\FrmeBase.pas' {FrameBase: TFrame}, 49 | FrmFileSelector in '..\Source\FileSelector\FrmFileSelector.pas' {FormFileSelector}, 50 | RemoveExplicitProperty in '..\Source\FormDesignerHelpers\RemoveExplicitProperty.pas', 51 | DSUFeatures in '..\Source\DSUFeatures\DSUFeatures.pas', 52 | FrmeOptionPageDSUFeatures in '..\Source\DSUFeatures\FrmeOptionPageDSUFeatures.pas' {FrameOptionPageDSUFeatures: TFrame}, 53 | ComponentSelector in '..\Source\ComponentSelector\ComponentSelector.pas', 54 | FrmeOptionPageComponentSelector in '..\Source\ComponentSelector\FrmeOptionPageComponentSelector.pas' {FrameOptionPageComponentSelector: TFrame}, 55 | InterceptIntf in '..\..\..\CompileInterceptor\Source\InterceptIntf.pas', 56 | InterceptLoader in '..\..\..\CompileInterceptor\Source\InterceptLoader.pas', 57 | DelphiDesignerParser in '..\..\..\Shared\PascalParser\DelphiDesignerParser.pas', 58 | DelphiExpr in '..\..\..\Shared\PascalParser\DelphiExpr.pas', 59 | DelphiLexer in '..\..\..\Shared\PascalParser\DelphiLexer.pas', 60 | DelphiParserContainers in '..\..\..\Shared\PascalParser\DelphiParserContainers.pas', 61 | DelphiPreproc in '..\..\..\Shared\PascalParser\DelphiPreproc.pas', 62 | IDENotifiers in '..\..\..\Shared\IDE\IDENotifiers.pas', 63 | ModuleData in '..\..\..\Shared\IDE\ModuleData.pas', 64 | ProjectResource in '..\..\..\Shared\IDE\ProjectResource.pas', 65 | IDEHooks in '..\..\..\Shared\IDE\IDEHooks.pas', 66 | ProjectData in '..\..\..\Shared\IDE\ProjectData.pas', 67 | SimpleXmlDoc in '..\..\..\Shared\Xml\SimpleXmlDoc.pas', 68 | SimpleXmlIntf in '..\..\..\Shared\Xml\SimpleXmlIntf.pas', 69 | SimpleXmlImport in '..\..\..\Shared\Xml\SimpleXmlImport.pas', 70 | UnitVersionInfo in '..\..\..\Shared\IDE\UnitVersionInfo.pas', 71 | IDEUtils in '..\..\..\Shared\IDE\IDEUtils.pas', 72 | Hooking in '..\..\..\Shared\Hooking.pas', 73 | FrmOptions in '..\..\..\Shared\IDE\Options\FrmOptions.pas' {FormOptions}, 74 | FrmTreePages in '..\..\..\Shared\IDE\Options\FrmTreePages.pas' {FormTreePages}, 75 | FrmBase in '..\..\..\Shared\IDE\FrmBase.pas' {FormBase}, 76 | HtHint in '..\..\..\Shared\IDE\HtHint.pas', 77 | ToolsAPIHelpers in '..\..\..\Shared\IDE\ToolsAPIHelpers.pas', 78 | FrmDDevExtOptions in '..\Source\FrmDDevExtOptions.pas' {FormDDevExtOptions}, 79 | FileStreams in '..\..\..\Shared\FileStreams.pas', 80 | FrmSwitchToModuleProject in '..\Source\CompileProgress\FrmSwitchToModuleProject.pas' {FormSwitchToModuleProject}, 81 | FocusEditor in '..\Source\Editor\FocusEditor.pas', 82 | StrucViewSearch in '..\Source\DSUFeatures\StrucViewSearch.pas', 83 | EditPopupCtrl in '..\Source\EditPopupCtrl.pas', 84 | VirtTreeHandler in '..\Source\VirtTreeHandler.pas', 85 | ImportHooking in '..\..\..\Shared\ImportHooking.pas', 86 | StartParameterClasses in '..\Source\StartParameterManager\StartParameterClasses.pas', 87 | StartParameterCtrl in '..\Source\StartParameterManager\StartParameterCtrl.pas', 88 | StartParameterManagerReg in '..\Source\StartParameterManager\StartParameterManagerReg.pas', 89 | FrmeOptionPageStartParameterTeam in '..\Source\StartParameterTeam\FrmeOptionPageStartParameterTeam.pas', 90 | CompilerClearOtherStates in '..\Source\CompileProgress\CompilerClearOtherStates.pas', 91 | TaskbarIntf in '..\Source\TaskbarIntf.pas', 92 | FrmReloadFiles in '..\Source\Editor\FrmReloadFiles.pas' {FormReloadFiles}, 93 | DocModuleHandler in '..\Source\Editor\DocModuleHandler.pas', 94 | CodeInsightHandling in '..\Source\Editor\CodeInsightHandling.pas', 95 | DisableAlphaSortClassCompletion in '..\Source\DSUFeatures\DisableAlphaSortClassCompletion.pas'; 96 | 97 | var 98 | AboutBoxServices: IOTAAboutBoxServices = nil; 99 | AboutBoxIndex: Integer = 0; 100 | 101 | procedure DoneWizard; 102 | begin 103 | try 104 | try 105 | UninstallHooks; 106 | finally 107 | if AboutBoxServices <> nil then 108 | begin 109 | AboutBoxServices.RemovePluginInfo(AboutBoxIndex); 110 | AboutBoxServices := nil; 111 | end; 112 | end; 113 | except 114 | on E: Exception do 115 | MessageBox(0, PChar(E.Message), PChar('DDevExtensions - ' + string(E.ClassName)), MB_OK or MB_ICONERROR); 116 | end; 117 | end; 118 | 119 | function InitWizard(const BorlandIDEServices: IBorlandIDEServices; 120 | RegisterProc: TWizardRegisterProc; var Terminate: TWizardTerminateProc): Boolean; stdcall; 121 | begin 122 | Terminate := DoneWizard; 123 | Result := True; 124 | if Supports(BorlandIDEServices, IOTAAboutBoxServices, AboutBoxServices) then 125 | begin 126 | AboutBoxIndex := AboutBoxServices.AddPluginInfo( 127 | sPluginName, 128 | sPluginName + sLineBreak + 129 | sLineBreak + 130 | sPluginCopyright + sLineBreak + 131 | 'Use at your own risk.', 132 | 0 133 | ); 134 | end; 135 | 136 | InstallHooks; 137 | end; 138 | 139 | exports 140 | InitWizard name WizardEntryPoint; 141 | 142 | begin 143 | {$R ..\Version.res} 144 | ShowOnSplashScreen; 145 | end. 146 | 147 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D103/DDevExtensions.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {DC66123B-00C0-4588-8B45-BAAB3894C9D2} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D104/DDevExtensions.dpr: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2011 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | library DDevExtensions; 10 | 11 | {$WEAKLINKRTTI ON} 12 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 13 | 14 | {$LIBSUFFIX 'D104'} 15 | 16 | {$I ..\Source\DelphiExtension.inc} 17 | 18 | uses 19 | Windows, 20 | SysUtils, 21 | Classes, 22 | Forms, 23 | Graphics, 24 | StdCtrls, 25 | ExtCtrls, 26 | ToolsAPI, 27 | Dialogs, 28 | Main in '..\Source\Main.pas', 29 | AppConsts in '..\Source\AppConsts.pas', 30 | Splash in '..\Source\Splash.pas', 31 | ComponentManager in '..\Source\ComponentManager.pas', 32 | NativeProgressForm in '..\Source\CompileProgress\NativeProgressForm.pas', 33 | CompileProgress in '..\Source\CompileProgress\CompileProgress.pas', 34 | FrmProjectSettingsSetVersioninfo in '..\Source\ProjectSettings\FrmProjectSettingsSetVersioninfo.pas' {FormProjectSettingsSetVersioninfo}, 35 | IDEMenuHandler in '..\Source\IDEMenuHandler\IDEMenuHandler.pas', 36 | DtmImages in '..\Source\DtmImages.pas' {DataModuleImages: TDataModule}, 37 | FrmeOptionPageCompilerProgress in '..\Source\CompileProgress\FrmeOptionPageCompilerProgress.pas' {FrameOptionPageCompilerProgress: TFrame}, 38 | CtrlUtils in '..\Source\CtrlUtils.pas', 39 | FrmExcelExport in '..\Source\ExcelExport\FrmExcelExport.pas' {FormExcelExport}, 40 | FrmeOptionPageUnitSelector in '..\Source\UnitSelector\FrmeOptionPageUnitSelector.pas' {FrameOptionPageUnitSelector: TFrame}, 41 | FrmeOptionPageKeybindings in '..\Source\Keybindings\FrmeOptionPageKeybindings.pas' {FrameOptionPageKeybindings: TFrame}, 42 | PluginConfig in '..\Source\PluginConfig.pas', 43 | FrmeOptionPageFileCleaner in '..\Source\FileCleaner\FrmeOptionPageFileCleaner.pas' {FrameOptionPageFileCleaner: TFrame}, 44 | FrmeOptionPageCompileBackup in '..\Source\CompileBackup\FrmeOptionPageCompileBackup.pas' {FrameOptionPageCompileBackup: TFrame}, 45 | RegisterPlugins in '..\Source\RegisterPlugins.pas', 46 | LabelMarginHelper in '..\Source\FormDesignerHelpers\LabelMarginHelper.pas', 47 | FrmeOptionPageFormDesigner in '..\Source\FormDesignerHelpers\FrmeOptionPageFormDesigner.pas' {FrameOptionPageFormDesigner: TFrame}, 48 | FrmeBase in '..\Source\FrmeBase.pas' {FrameBase: TFrame}, 49 | FrmFileSelector in '..\Source\FileSelector\FrmFileSelector.pas' {FormFileSelector}, 50 | RemoveExplicitProperty in '..\Source\FormDesignerHelpers\RemoveExplicitProperty.pas', 51 | DSUFeatures in '..\Source\DSUFeatures\DSUFeatures.pas', 52 | FrmeOptionPageDSUFeatures in '..\Source\DSUFeatures\FrmeOptionPageDSUFeatures.pas' {FrameOptionPageDSUFeatures: TFrame}, 53 | ComponentSelector in '..\Source\ComponentSelector\ComponentSelector.pas', 54 | FrmeOptionPageComponentSelector in '..\Source\ComponentSelector\FrmeOptionPageComponentSelector.pas' {FrameOptionPageComponentSelector: TFrame}, 55 | InterceptIntf in '..\..\..\CompileInterceptor\Source\InterceptIntf.pas', 56 | InterceptLoader in '..\..\..\CompileInterceptor\Source\InterceptLoader.pas', 57 | DelphiDesignerParser in '..\..\..\Shared\PascalParser\DelphiDesignerParser.pas', 58 | DelphiExpr in '..\..\..\Shared\PascalParser\DelphiExpr.pas', 59 | DelphiLexer in '..\..\..\Shared\PascalParser\DelphiLexer.pas', 60 | DelphiParserContainers in '..\..\..\Shared\PascalParser\DelphiParserContainers.pas', 61 | DelphiPreproc in '..\..\..\Shared\PascalParser\DelphiPreproc.pas', 62 | IDENotifiers in '..\..\..\Shared\IDE\IDENotifiers.pas', 63 | ModuleData in '..\..\..\Shared\IDE\ModuleData.pas', 64 | ProjectResource in '..\..\..\Shared\IDE\ProjectResource.pas', 65 | IDEHooks in '..\..\..\Shared\IDE\IDEHooks.pas', 66 | ProjectData in '..\..\..\Shared\IDE\ProjectData.pas', 67 | SimpleXmlDoc in '..\..\..\Shared\Xml\SimpleXmlDoc.pas', 68 | SimpleXmlIntf in '..\..\..\Shared\Xml\SimpleXmlIntf.pas', 69 | SimpleXmlImport in '..\..\..\Shared\Xml\SimpleXmlImport.pas', 70 | UnitVersionInfo in '..\..\..\Shared\IDE\UnitVersionInfo.pas', 71 | IDEUtils in '..\..\..\Shared\IDE\IDEUtils.pas', 72 | Hooking in '..\..\..\Shared\Hooking.pas', 73 | FrmOptions in '..\..\..\Shared\IDE\Options\FrmOptions.pas' {FormOptions}, 74 | FrmTreePages in '..\..\..\Shared\IDE\Options\FrmTreePages.pas' {FormTreePages}, 75 | FrmBase in '..\..\..\Shared\IDE\FrmBase.pas' {FormBase}, 76 | HtHint in '..\..\..\Shared\IDE\HtHint.pas', 77 | ToolsAPIHelpers in '..\..\..\Shared\IDE\ToolsAPIHelpers.pas', 78 | FrmDDevExtOptions in '..\Source\FrmDDevExtOptions.pas' {FormDDevExtOptions}, 79 | FileStreams in '..\..\..\Shared\FileStreams.pas', 80 | FrmSwitchToModuleProject in '..\Source\CompileProgress\FrmSwitchToModuleProject.pas' {FormSwitchToModuleProject}, 81 | FocusEditor in '..\Source\Editor\FocusEditor.pas', 82 | StrucViewSearch in '..\Source\DSUFeatures\StrucViewSearch.pas', 83 | EditPopupCtrl in '..\Source\EditPopupCtrl.pas', 84 | VirtTreeHandler in '..\Source\VirtTreeHandler.pas', 85 | ImportHooking in '..\..\..\Shared\ImportHooking.pas', 86 | StartParameterClasses in '..\Source\StartParameterManager\StartParameterClasses.pas', 87 | StartParameterCtrl in '..\Source\StartParameterManager\StartParameterCtrl.pas', 88 | StartParameterManagerReg in '..\Source\StartParameterManager\StartParameterManagerReg.pas', 89 | FrmeOptionPageStartParameterTeam in '..\Source\StartParameterTeam\FrmeOptionPageStartParameterTeam.pas', 90 | CompilerClearOtherStates in '..\Source\CompileProgress\CompilerClearOtherStates.pas', 91 | TaskbarIntf in '..\Source\TaskbarIntf.pas', 92 | FrmReloadFiles in '..\Source\Editor\FrmReloadFiles.pas' {FormReloadFiles}, 93 | DocModuleHandler in '..\Source\Editor\DocModuleHandler.pas', 94 | CodeInsightHandling in '..\Source\Editor\CodeInsightHandling.pas', 95 | DisableAlphaSortClassCompletion in '..\Source\DSUFeatures\DisableAlphaSortClassCompletion.pas'; 96 | 97 | var 98 | AboutBoxServices: IOTAAboutBoxServices = nil; 99 | AboutBoxIndex: Integer = 0; 100 | 101 | procedure DoneWizard; 102 | begin 103 | try 104 | try 105 | UninstallHooks; 106 | finally 107 | if AboutBoxServices <> nil then 108 | begin 109 | AboutBoxServices.RemovePluginInfo(AboutBoxIndex); 110 | AboutBoxServices := nil; 111 | end; 112 | end; 113 | except 114 | on E: Exception do 115 | MessageBox(0, PChar(E.Message), PChar('DDevExtensions - ' + string(E.ClassName)), MB_OK or MB_ICONERROR); 116 | end; 117 | end; 118 | 119 | function InitWizard(const BorlandIDEServices: IBorlandIDEServices; 120 | RegisterProc: TWizardRegisterProc; var Terminate: TWizardTerminateProc): Boolean; stdcall; 121 | begin 122 | Terminate := DoneWizard; 123 | Result := True; 124 | if Supports(BorlandIDEServices, IOTAAboutBoxServices, AboutBoxServices) then 125 | begin 126 | AboutBoxIndex := AboutBoxServices.AddPluginInfo( 127 | sPluginName, 128 | sPluginName + sLineBreak + 129 | sLineBreak + 130 | sPluginCopyright + sLineBreak + 131 | 'Use at your own risk.', 132 | 0 133 | ); 134 | end; 135 | 136 | InstallHooks; 137 | end; 138 | 139 | exports 140 | InitWizard name WizardEntryPoint; 141 | 142 | begin 143 | {$R ..\Version.res} 144 | ShowOnSplashScreen; 145 | end. 146 | 147 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D104/DDevExtensions.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {DC66123B-00C0-4588-8B45-BAAB3894C9D2} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D110/DDevExtensions.dpr: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2011 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | library DDevExtensions; 10 | 11 | {$WEAKLINKRTTI ON} 12 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 13 | 14 | {$LIBSUFFIX 'D110'} 15 | 16 | {$I ..\Source\DelphiExtension.inc} 17 | 18 | uses 19 | Windows, 20 | SysUtils, 21 | Classes, 22 | Forms, 23 | Graphics, 24 | StdCtrls, 25 | ExtCtrls, 26 | ToolsAPI, 27 | Dialogs, 28 | Main in '..\Source\Main.pas', 29 | AppConsts in '..\Source\AppConsts.pas', 30 | Splash in '..\Source\Splash.pas', 31 | ComponentManager in '..\Source\ComponentManager.pas', 32 | NativeProgressForm in '..\Source\CompileProgress\NativeProgressForm.pas', 33 | CompileProgress in '..\Source\CompileProgress\CompileProgress.pas', 34 | FrmProjectSettingsSetVersioninfo in '..\Source\ProjectSettings\FrmProjectSettingsSetVersioninfo.pas' {FormProjectSettingsSetVersioninfo}, 35 | IDEMenuHandler in '..\Source\IDEMenuHandler\IDEMenuHandler.pas', 36 | DtmImages in '..\Source\DtmImages.pas' {DataModuleImages: TDataModule}, 37 | FrmeOptionPageCompilerProgress in '..\Source\CompileProgress\FrmeOptionPageCompilerProgress.pas' {FrameOptionPageCompilerProgress: TFrame}, 38 | CtrlUtils in '..\Source\CtrlUtils.pas', 39 | FrmExcelExport in '..\Source\ExcelExport\FrmExcelExport.pas' {FormExcelExport}, 40 | FrmeOptionPageUnitSelector in '..\Source\UnitSelector\FrmeOptionPageUnitSelector.pas' {FrameOptionPageUnitSelector: TFrame}, 41 | FrmeOptionPageKeybindings in '..\Source\Keybindings\FrmeOptionPageKeybindings.pas' {FrameOptionPageKeybindings: TFrame}, 42 | PluginConfig in '..\Source\PluginConfig.pas', 43 | FrmeOptionPageFileCleaner in '..\Source\FileCleaner\FrmeOptionPageFileCleaner.pas' {FrameOptionPageFileCleaner: TFrame}, 44 | FrmeOptionPageCompileBackup in '..\Source\CompileBackup\FrmeOptionPageCompileBackup.pas' {FrameOptionPageCompileBackup: TFrame}, 45 | RegisterPlugins in '..\Source\RegisterPlugins.pas', 46 | LabelMarginHelper in '..\Source\FormDesignerHelpers\LabelMarginHelper.pas', 47 | FrmeOptionPageFormDesigner in '..\Source\FormDesignerHelpers\FrmeOptionPageFormDesigner.pas' {FrameOptionPageFormDesigner: TFrame}, 48 | FrmeBase in '..\Source\FrmeBase.pas' {FrameBase: TFrame}, 49 | FrmFileSelector in '..\Source\FileSelector\FrmFileSelector.pas' {FormFileSelector}, 50 | RemoveExplicitProperty in '..\Source\FormDesignerHelpers\RemoveExplicitProperty.pas', 51 | DSUFeatures in '..\Source\DSUFeatures\DSUFeatures.pas', 52 | FrmeOptionPageDSUFeatures in '..\Source\DSUFeatures\FrmeOptionPageDSUFeatures.pas' {FrameOptionPageDSUFeatures: TFrame}, 53 | ComponentSelector in '..\Source\ComponentSelector\ComponentSelector.pas', 54 | FrmeOptionPageComponentSelector in '..\Source\ComponentSelector\FrmeOptionPageComponentSelector.pas' {FrameOptionPageComponentSelector: TFrame}, 55 | InterceptIntf in '..\..\..\CompileInterceptor\Source\InterceptIntf.pas', 56 | InterceptLoader in '..\..\..\CompileInterceptor\Source\InterceptLoader.pas', 57 | DelphiDesignerParser in '..\..\..\Shared\PascalParser\DelphiDesignerParser.pas', 58 | DelphiExpr in '..\..\..\Shared\PascalParser\DelphiExpr.pas', 59 | DelphiLexer in '..\..\..\Shared\PascalParser\DelphiLexer.pas', 60 | DelphiParserContainers in '..\..\..\Shared\PascalParser\DelphiParserContainers.pas', 61 | DelphiPreproc in '..\..\..\Shared\PascalParser\DelphiPreproc.pas', 62 | IDENotifiers in '..\..\..\Shared\IDE\IDENotifiers.pas', 63 | ModuleData in '..\..\..\Shared\IDE\ModuleData.pas', 64 | ProjectResource in '..\..\..\Shared\IDE\ProjectResource.pas', 65 | IDEHooks in '..\..\..\Shared\IDE\IDEHooks.pas', 66 | ProjectData in '..\..\..\Shared\IDE\ProjectData.pas', 67 | SimpleXmlDoc in '..\..\..\Shared\Xml\SimpleXmlDoc.pas', 68 | SimpleXmlIntf in '..\..\..\Shared\Xml\SimpleXmlIntf.pas', 69 | SimpleXmlImport in '..\..\..\Shared\Xml\SimpleXmlImport.pas', 70 | UnitVersionInfo in '..\..\..\Shared\IDE\UnitVersionInfo.pas', 71 | IDEUtils in '..\..\..\Shared\IDE\IDEUtils.pas', 72 | Hooking in '..\..\..\Shared\Hooking.pas', 73 | FrmOptions in '..\..\..\Shared\IDE\Options\FrmOptions.pas' {FormOptions}, 74 | FrmTreePages in '..\..\..\Shared\IDE\Options\FrmTreePages.pas' {FormTreePages}, 75 | FrmBase in '..\..\..\Shared\IDE\FrmBase.pas' {FormBase}, 76 | HtHint in '..\..\..\Shared\IDE\HtHint.pas', 77 | ToolsAPIHelpers in '..\..\..\Shared\IDE\ToolsAPIHelpers.pas', 78 | FrmDDevExtOptions in '..\Source\FrmDDevExtOptions.pas' {FormDDevExtOptions}, 79 | FileStreams in '..\..\..\Shared\FileStreams.pas', 80 | FrmSwitchToModuleProject in '..\Source\CompileProgress\FrmSwitchToModuleProject.pas' {FormSwitchToModuleProject}, 81 | FocusEditor in '..\Source\Editor\FocusEditor.pas', 82 | StrucViewSearch in '..\Source\DSUFeatures\StrucViewSearch.pas', 83 | EditPopupCtrl in '..\Source\EditPopupCtrl.pas', 84 | VirtTreeHandler in '..\Source\VirtTreeHandler.pas', 85 | ImportHooking in '..\..\..\Shared\ImportHooking.pas', 86 | StartParameterClasses in '..\Source\StartParameterManager\StartParameterClasses.pas', 87 | StartParameterCtrl in '..\Source\StartParameterManager\StartParameterCtrl.pas', 88 | StartParameterManagerReg in '..\Source\StartParameterManager\StartParameterManagerReg.pas', 89 | FrmeOptionPageStartParameterTeam in '..\Source\StartParameterTeam\FrmeOptionPageStartParameterTeam.pas', 90 | CompilerClearOtherStates in '..\Source\CompileProgress\CompilerClearOtherStates.pas', 91 | TaskbarIntf in '..\Source\TaskbarIntf.pas', 92 | FrmReloadFiles in '..\Source\Editor\FrmReloadFiles.pas' {FormReloadFiles}, 93 | DocModuleHandler in '..\Source\Editor\DocModuleHandler.pas', 94 | CodeInsightHandling in '..\Source\Editor\CodeInsightHandling.pas', 95 | DisableAlphaSortClassCompletion in '..\Source\DSUFeatures\DisableAlphaSortClassCompletion.pas'; 96 | 97 | var 98 | AboutBoxServices: IOTAAboutBoxServices = nil; 99 | AboutBoxIndex: Integer = 0; 100 | 101 | procedure DoneWizard; 102 | begin 103 | try 104 | try 105 | UninstallHooks; 106 | finally 107 | if AboutBoxServices <> nil then 108 | begin 109 | AboutBoxServices.RemovePluginInfo(AboutBoxIndex); 110 | AboutBoxServices := nil; 111 | end; 112 | end; 113 | except 114 | on E: Exception do 115 | MessageBox(0, PChar(E.Message), PChar('DDevExtensions - ' + string(E.ClassName)), MB_OK or MB_ICONERROR); 116 | end; 117 | end; 118 | 119 | function InitWizard(const BorlandIDEServices: IBorlandIDEServices; 120 | RegisterProc: TWizardRegisterProc; var Terminate: TWizardTerminateProc): Boolean; stdcall; 121 | begin 122 | Terminate := DoneWizard; 123 | Result := True; 124 | if Supports(BorlandIDEServices, IOTAAboutBoxServices, AboutBoxServices) then 125 | begin 126 | AboutBoxIndex := AboutBoxServices.AddPluginInfo( 127 | sPluginName, 128 | sPluginName + sLineBreak + 129 | sLineBreak + 130 | sPluginCopyright + sLineBreak + 131 | 'Use at your own risk.', 132 | 0 133 | ); 134 | end; 135 | 136 | InstallHooks; 137 | end; 138 | 139 | exports 140 | InitWizard name WizardEntryPoint; 141 | 142 | begin 143 | {$R ..\Version.res} 144 | ShowOnSplashScreen; 145 | end. 146 | 147 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D110/DDevExtensions.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {DC66123B-00C0-4588-8B45-BAAB3894C9D2} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/D_D120/DDevExtensions.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {DC66123B-00C0-4588-8B45-BAAB3894C9D2} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/DeleteIDEFiles.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd /d "%~dp0" 3 | del /S *.stat *.identcache *.dproj.local 4 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Doc/Features.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Doc/Features.docx -------------------------------------------------------------------------------- /Code/DDevExtensions/Doc/StartParameters.txt: -------------------------------------------------------------------------------- 1 | Description: 2 | ============ 3 | The Start Parameters toolbar makes it easy to switch between different start parameters without editing the 4 | project options. Because the project file isn't modified, no recompile is forced. 5 | 6 | Features: 7 | ========= 8 | o *.params/*.params.local files are reloaded when the combobox control gets the focus. 9 | o Pressing Ctrl+C copies the selected parameters to the clipboard unless "" is select. 10 | 11 | 12 | File format: 13 | ============ 14 | Project.params/.local: 15 | 16 | 17 | 18 | MeineDB 19 | 20 | 21 | -x -y -z 22 | -a $(DB) -u USER -p $(PASSWORD) 23 | 24 | 25 | 26 | 27 | 28 | Macro usage: 29 | ============ 30 | The syntax for a macro is: $(MacroName). The macro will be replaced by the resolved macro content. 31 | 32 | 33 | Tags: 34 | ===== 35 | 36 | Macro-Tag: 37 | Name-Attribute : Macro name, does not need to be unique 38 | FromFile-Attribute: The Value is the content of a file. (supports macros) 39 | Line-Attribute : The Value is the n-th line (1..n) of a file (supports macros). If not set or empty, the whole file is the content 40 | RegEx-Attribute : The Value is the match of the RegEx from the content (line or whole file depending on Line-Attribute) (supports macros) 41 | Content : Macro value (supports macros). Not used if FromFile-Attribute is set 42 | 43 | Param-Tag 44 | Name-Attribute : Unique name that is displayed in the combobox 45 | Content : Start Parameters (supports macros) 46 | 47 | Include-Tag 48 | File-Attribute : Name of the file that should be included (supports macros) 49 | Force-Attribute : Reports an error if the file doesn't exist and Force="true" 50 | 51 | 52 | Predefined Macros: 53 | ================== 54 | $(ParamFileName) => projectpath\project.param 55 | $(ParamFilePath) => projectpath\ 56 | $(Year) => 2011 57 | $(Month) => 12 58 | $(Day) => 19 59 | $(MonthShortName) => Dec 60 | $(MonthName) => December 61 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Installer/DDevExtensionsReg.dpr: -------------------------------------------------------------------------------- 1 | {$SetPEFlags 1} // no reloc info in EXE 2 | 3 | program DDevExtensionsReg; 4 | 5 | {$IF CompilerVersion >= 21.0} 6 | {$WEAKLINKRTTI ON} 7 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 8 | {$IFEND} 9 | 10 | uses 11 | Forms, 12 | Main in 'Main.pas' {FormMain}, 13 | AppConsts in '..\Source\AppConsts.pas'; 14 | 15 | {$R *.res} 16 | 17 | begin 18 | Application.Initialize; 19 | Application.Title := 'DDevExtensions Installer'; 20 | Application.CreateForm(TFormMain, FormMain); 21 | Application.Run; 22 | end. 23 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Installer/DDevExtensionsReg.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Installer/DDevExtensionsReg.res -------------------------------------------------------------------------------- /Code/DDevExtensions/Installer/InstallDDevExtensions_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Installer/InstallDDevExtensions_Icon.ico -------------------------------------------------------------------------------- /Code/DDevExtensions/Installer/Main.dfm: -------------------------------------------------------------------------------- 1 | object FormMain: TFormMain 2 | Left = 362 3 | Top = 178 4 | ActiveControl = btnInstall 5 | BorderIcons = [biSystemMenu, biMinimize] 6 | Caption = 'Install' 7 | ClientHeight = 190 8 | ClientWidth = 377 9 | Color = clBtnFace 10 | Font.Charset = DEFAULT_CHARSET 11 | Font.Color = clWindowText 12 | Font.Height = -11 13 | Font.Name = 'Tahoma' 14 | Font.Style = [] 15 | OldCreateOrder = False 16 | Position = poScreenCenter 17 | OnCanResize = FormCanResize 18 | OnCreate = FormCreate 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object Label1: TLabel 22 | Left = 8 23 | Top = 8 24 | Width = 121 25 | Height = 13 26 | Caption = 'Install to / Uninstall from:' 27 | Font.Charset = DEFAULT_CHARSET 28 | Font.Color = clWindowText 29 | Font.Height = -11 30 | Font.Name = 'Tahoma' 31 | Font.Style = [] 32 | ParentFont = False 33 | end 34 | object btnInstall: TButton 35 | Left = 8 36 | Top = 157 37 | Width = 75 38 | Height = 25 39 | Caption = '&Install' 40 | Default = True 41 | TabOrder = 0 42 | OnClick = btnInstallClick 43 | end 44 | object btnQuit: TButton 45 | Left = 294 46 | Top = 157 47 | Width = 75 48 | Height = 25 49 | Cancel = True 50 | Caption = '&Quit' 51 | TabOrder = 2 52 | OnClick = btnQuitClick 53 | end 54 | object btnUninstall: TButton 55 | Left = 89 56 | Top = 157 57 | Width = 75 58 | Height = 25 59 | Caption = '&Uninstall' 60 | TabOrder = 1 61 | OnClick = btnUninstallClick 62 | end 63 | object cbxEnvs: TCheckListBox 64 | Left = 8 65 | Top = 24 66 | Width = 361 67 | Height = 110 68 | ItemHeight = 13 69 | TabOrder = 3 70 | end 71 | object pbProgress: TProgressBar 72 | Left = 8 73 | Top = 140 74 | Width = 361 75 | Height = 11 76 | TabOrder = 4 77 | Visible = False 78 | end 79 | end 80 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompileBackup/FrmeOptionPageCompileBackup.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageCompileBackup: TFrameOptionPageCompileBackup 2 | Width = 507 3 | Height = 241 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 507 7 | Height = 192 8 | object cbxActive: TCheckBox 9 | Left = 8 10 | Top = 8 11 | Width = 129 12 | Height = 17 13 | Caption = '&Active' 14 | TabOrder = 0 15 | OnClick = cbxActiveClick 16 | end 17 | object cbxDeleteBackupAfterClose: TCheckBox 18 | Left = 24 19 | Top = 31 20 | Width = 273 21 | Height = 17 22 | Caption = 'Delete backup files after the file is closed' 23 | TabOrder = 1 24 | end 25 | end 26 | inherited pnlDescription: TPanel 27 | Width = 507 28 | inherited bvlSplitter: TBevel 29 | Width = 507 30 | end 31 | inherited lblDescription: TLabel 32 | Width = 321 33 | Caption = 34 | 'Creates a .cbk file for every unsaved file when compiling a proj' + 35 | 'ect.' 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompileProgress/FrmSwitchToModuleProject.dfm: -------------------------------------------------------------------------------- 1 | inherited FormSwitchToModuleProject: TFormSwitchToModuleProject 2 | ActiveControl = ButtonNo 3 | BorderStyle = bsDialog 4 | Caption = 'Compile/Build - Switch Active Project' 5 | ClientHeight = 209 6 | ClientWidth = 438 7 | Color = clWindow 8 | KeyPreview = True 9 | Position = poScreenCenter 10 | OnCreate = FormCreate 11 | OnKeyDown = FormKeyDown 12 | ExplicitWidth = 444 13 | ExplicitHeight = 235 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object LabelModuleCaption: TLabel 17 | Left = 8 18 | Top = 24 19 | Width = 71 20 | Height = 13 21 | Caption = 'Active Module:' 22 | end 23 | object LabelFileName: TLabel 24 | Left = 85 25 | Top = 24 26 | Width = 84 27 | Height = 13 28 | Caption = 'LabelFileName' 29 | Font.Charset = DEFAULT_CHARSET 30 | Font.Color = clWindowText 31 | Font.Height = -11 32 | Font.Style = [fsBold] 33 | ParentFont = False 34 | ParentShowHint = False 35 | ShowAccelChar = False 36 | ShowHint = True 37 | end 38 | object LabelActiveProjectCaption: TLabel 39 | Left = 8 40 | Top = 8 41 | Width = 69 42 | Height = 13 43 | Caption = 'Active Project:' 44 | end 45 | object LabelActiveProject: TLabel 46 | Left = 85 47 | Top = 8 48 | Width = 108 49 | Height = 13 50 | Caption = 'LabelActiveProject' 51 | Font.Charset = DEFAULT_CHARSET 52 | Font.Color = clWindowText 53 | Font.Height = -11 54 | Font.Style = [fsBold] 55 | ParentFont = False 56 | ParentShowHint = False 57 | ShowAccelChar = False 58 | ShowHint = True 59 | end 60 | object LabelQuestion: TLabel 61 | Left = 8 62 | Top = 108 63 | Width = 267 64 | Height = 13 65 | Anchors = [akLeft, akBottom] 66 | Caption = 'Do you want to &switch to the module'#39's project?' 67 | FocusControl = ComboBoxProjects 68 | Font.Charset = DEFAULT_CHARSET 69 | Font.Color = clWindowText 70 | Font.Height = -11 71 | Font.Style = [fsBold] 72 | ParentFont = False 73 | end 74 | object LabelText: TLabel 75 | Left = 8 76 | Top = 56 77 | Width = 411 78 | Height = 40 79 | AutoSize = False 80 | Caption = 81 | 'The module is not part of the active project and is not in a dir' + 82 | 'ect or indirect dependent project.' 83 | WordWrap = True 84 | end 85 | object PanelBottom: TPanel 86 | Left = 0 87 | Top = 174 88 | Width = 438 89 | Height = 35 90 | Align = alBottom 91 | BevelOuter = bvNone 92 | ParentBackground = False 93 | TabOrder = 2 94 | ExplicitTop = 151 95 | ExplicitWidth = 425 96 | DesignSize = ( 97 | 438 98 | 35) 99 | object BevelBottom: TBevel 100 | Left = 0 101 | Top = 0 102 | Width = 438 103 | Height = 2 104 | Align = alTop 105 | Shape = bsTopLine 106 | ExplicitWidth = 414 107 | end 108 | object ButtonYes: TButton 109 | Left = 183 110 | Top = 6 111 | Width = 75 112 | Height = 25 113 | Anchors = [akTop, akRight] 114 | Caption = 'ButtonYes' 115 | ModalResult = 6 116 | TabOrder = 0 117 | ExplicitLeft = 170 118 | end 119 | object ButtonNo: TButton 120 | Left = 264 121 | Top = 6 122 | Width = 75 123 | Height = 25 124 | Anchors = [akTop, akRight] 125 | Caption = 'ButtonNo' 126 | Default = True 127 | ModalResult = 7 128 | TabOrder = 1 129 | ExplicitLeft = 251 130 | end 131 | object ButtonCancel: TButton 132 | Left = 357 133 | Top = 6 134 | Width = 75 135 | Height = 25 136 | Anchors = [akTop, akRight] 137 | Cancel = True 138 | Caption = 'ButtonCancel' 139 | ModalResult = 2 140 | TabOrder = 2 141 | ExplicitLeft = 344 142 | end 143 | object CheckBoxDontShowAgain: TCheckBox 144 | Left = 8 145 | Top = 10 146 | Width = 145 147 | Height = 17 148 | Caption = '&Don'#39't show again' 149 | TabOrder = 3 150 | end 151 | end 152 | object ComboBoxProjects: TComboBox 153 | Left = 8 154 | Top = 124 155 | Width = 422 156 | Height = 21 157 | Style = csDropDownList 158 | Anchors = [akLeft, akRight, akBottom] 159 | Sorted = True 160 | TabOrder = 0 161 | end 162 | object CheckBoxTempSwitch: TCheckBox 163 | Left = 8 164 | Top = 151 165 | Width = 217 166 | Height = 17 167 | Anchors = [akLeft, akBottom] 168 | Caption = 'Switch &temporary [Shift-Key]' 169 | Checked = True 170 | State = cbChecked 171 | TabOrder = 1 172 | end 173 | end 174 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompileProgress/FrmSwitchToModuleProject.pas: -------------------------------------------------------------------------------- 1 | unit FrmSwitchToModuleProject; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, FrmBase, StdCtrls, ExtCtrls, ToolsAPI; 8 | 9 | type 10 | TFormSwitchToModuleProject = class(TFormBase) 11 | PanelBottom: TPanel; 12 | ButtonYes: TButton; 13 | ButtonNo: TButton; 14 | ButtonCancel: TButton; 15 | CheckBoxDontShowAgain: TCheckBox; 16 | BevelBottom: TBevel; 17 | ComboBoxProjects: TComboBox; 18 | LabelModuleCaption: TLabel; 19 | LabelFileName: TLabel; 20 | LabelActiveProjectCaption: TLabel; 21 | LabelActiveProject: TLabel; 22 | LabelQuestion: TLabel; 23 | LabelText: TLabel; 24 | CheckBoxTempSwitch: TCheckBox; 25 | procedure FormCreate(Sender: TObject); 26 | procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 27 | private 28 | { Private-Deklarationen } 29 | function GetProjectName(const AProject: IOTAProject): string; 30 | function InternShowDialog(AModule: IOTAModule; var AProject: IOTAProject; 31 | var ADontShowAgain: Boolean; SwitchTemporary: Boolean): TModalResult; 32 | public 33 | { Public-Deklarationen } 34 | class function ShowDialog(AModule: IOTAModule; var AProject: IOTAProject; 35 | var ADontShowAgain: Boolean; SwitchTemporary: Boolean): TModalResult; 36 | end; 37 | 38 | implementation 39 | 40 | uses 41 | Consts, AppConsts; 42 | 43 | {$R *.dfm} 44 | 45 | class function TFormSwitchToModuleProject.ShowDialog(AModule: IOTAModule; 46 | var AProject: IOTAProject; var ADontShowAgain: Boolean; SwitchTemporary: Boolean): TModalResult; 47 | begin 48 | if AModule.OwnerCount > 0 then 49 | begin 50 | with TFormSwitchToModuleProject.Create(nil) do 51 | try 52 | Result := InternShowDialog(AModule, AProject, ADontShowAgain, SwitchTemporary) 53 | finally 54 | Free; 55 | end; 56 | end 57 | else 58 | Result := mrNo; 59 | end; 60 | 61 | function TFormSwitchToModuleProject.InternShowDialog(AModule: IOTAModule; 62 | var AProject: IOTAProject; var ADontShowAgain: Boolean; SwitchTemporary: Boolean): TModalResult; 63 | var 64 | I: Integer; 65 | begin 66 | for I := 0 to AModule.OwnerCount - 1 do 67 | ComboBoxProjects.Items.AddObject(GetProjectName(AModule.Owners[I]), TObject(I)); 68 | ComboBoxProjects.ItemIndex := 0; 69 | 70 | CheckBoxTempSwitch.Checked := SwitchTemporary; 71 | AProject := GetActiveProject; 72 | LabelActiveProject.Caption := GetProjectName(AProject); 73 | if AProject <> nil then 74 | LabelActiveProject.Hint := AProject.FileName; 75 | LabelFileName.Caption := ExtractFileName(AModule.FileName); 76 | LabelFileName.Hint := AModule.FileName; 77 | 78 | Result := ShowModal; 79 | if Result = mrYes then 80 | begin 81 | AProject := AModule.Owners[Integer(ComboBoxProjects.Items.Objects[ComboBoxProjects.ItemIndex])]; 82 | if CheckBoxTempSwitch.Checked then 83 | Result := mrRetry; 84 | end; 85 | if Result <> mrCancel then 86 | ADontShowAgain := CheckBoxDontShowAgain.Checked; 87 | end; 88 | 89 | procedure TFormSwitchToModuleProject.FormKeyDown(Sender: TObject; var Key: Word; 90 | Shift: TShiftState); 91 | begin 92 | inherited; 93 | if ssShift in Shift then 94 | CheckBoxTempSwitch.Checked := not CheckBoxTempSwitch.Checked; 95 | end; 96 | 97 | function TFormSwitchToModuleProject.GetProjectName(const AProject: IOTAProject): string; 98 | begin 99 | if AProject <> nil then 100 | Result := ChangeFileExt(ExtractFileName(AProject.FileName), '') 101 | else 102 | Result := ''; 103 | end; 104 | 105 | procedure TFormSwitchToModuleProject.FormCreate(Sender: TObject); 106 | begin 107 | inherited; 108 | { Localize dialog } 109 | ButtonYes.Caption := SYesButton; 110 | ButtonNo.Caption := SNoButton; 111 | ButtonCancel.Caption := SCancelButton; 112 | 113 | Caption := sCapSwitchToModuleProject; 114 | LabelActiveProjectCaption.Caption := sLblActiveProject; 115 | LabelModuleCaption.Caption := sLblActiveModule; 116 | LabelText.Caption := sLblSwitchCurrentModuleProject; 117 | LabelQuestion.Caption := sLblSwitchToModuleProjectQuestion; 118 | CheckBoxDontShowAgain.Caption := sLblDontShowAgain; 119 | CheckBoxTempSwitch.Caption := sLblTemporarySwitch; 120 | end; 121 | 122 | end. 123 | 124 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompileProgress/FrmeOptionPageCompilerProgress.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageCompilerProgress: TFrameOptionPageCompilerProgress 2 | Width = 403 3 | Height = 222 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 403 7 | Height = 173 8 | object cbxDisableRebuildDlg: TCheckBox 9 | Left = 8 10 | Top = 52 11 | Width = 241 12 | Height = 19 13 | Caption = '&Disable "Source modified. Rebuild?" dialog' 14 | TabOrder = 2 15 | end 16 | object chkAutoSaveAfterSuccessfulCompile: TCheckBox 17 | Left = 8 18 | Top = 75 19 | Width = 241 20 | Height = 19 21 | Caption = 'AutoSave &editor files after successful compile' 22 | TabOrder = 3 23 | end 24 | object chkLastCompileVersionInfo: TCheckBox 25 | Left = 8 26 | Top = 121 27 | Width = 241 28 | Height = 19 29 | Caption = 'Put "Last Compile" time into Version Info' 30 | TabOrder = 5 31 | OnClick = chkLastCompileVersionInfoClick 32 | end 33 | object edtLastCompileVersionInfoFormat: TEdit 34 | Left = 32 35 | Top = 141 36 | Width = 217 37 | Height = 21 38 | TabOrder = 6 39 | end 40 | object chkAskBeforeCompilingFileFromDiffernetProject: TCheckBox 41 | Left = 8 42 | Top = 98 43 | Width = 361 44 | Height = 19 45 | Caption = 'Ask before compiling if current file is from a different project' 46 | TabOrder = 4 47 | end 48 | object chkReleaseCompilerUnitCache: TCheckBox 49 | Left = 8 50 | Top = 7 51 | Width = 361 52 | Height = 19 53 | Caption = 'Release compiler unit cache of other projects before compiling' 54 | TabOrder = 0 55 | OnClick = chkReleaseCompilerUnitCacheClick 56 | end 57 | object chkReleaseCompilerUnitCacheHigh: TCheckBox 58 | Left = 24 59 | Top = 29 60 | Width = 361 61 | Height = 19 62 | Caption = 'Release only if memory usage is high' 63 | TabOrder = 1 64 | end 65 | end 66 | inherited pnlDescription: TPanel 67 | Width = 403 68 | inherited bvlSplitter: TBevel 69 | Width = 403 70 | end 71 | inherited lblDescription: TLabel 72 | Width = 191 73 | Caption = 'Configures the IDE'#39's compile behaviour.' 74 | ExplicitWidth = 191 75 | end 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompileProgress/FrmeOptionPageCompilerProgress.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2011 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmeOptionPageCompilerProgress; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, FrmeBase, StdCtrls, ExtCtrls, 17 | Dialogs, FrmTreePages, CompileProgress; 18 | 19 | type 20 | TFrameOptionPageCompilerProgress = class(TFrameBase, ITreePageComponent) 21 | cbxDisableRebuildDlg: TCheckBox; 22 | chkAutoSaveAfterSuccessfulCompile: TCheckBox; 23 | chkLastCompileVersionInfo: TCheckBox; 24 | edtLastCompileVersionInfoFormat: TEdit; 25 | chkAskBeforeCompilingFileFromDiffernetProject: TCheckBox; 26 | chkReleaseCompilerUnitCache: TCheckBox; 27 | chkReleaseCompilerUnitCacheHigh: TCheckBox; 28 | procedure chkLastCompileVersionInfoClick(Sender: TObject); 29 | procedure chkReleaseCompilerUnitCacheClick(Sender: TObject); 30 | private 31 | { Private-Deklarationen } 32 | FCompileProgress: TCompileProgress; 33 | public 34 | { Public-Deklarationen } 35 | constructor Create(AOwner: TComponent); override; 36 | 37 | procedure LoadData; 38 | procedure SaveData; 39 | procedure Selected; 40 | procedure Unselected; 41 | procedure SetUserData(UserData: TObject); 42 | end; 43 | 44 | implementation 45 | 46 | {$R *.dfm} 47 | 48 | { TFrameOptionPageCompilerProgress } 49 | 50 | procedure TFrameOptionPageCompilerProgress.SetUserData(UserData: TObject); 51 | begin 52 | FCompileProgress := UserData as TCompileProgress; 53 | end; 54 | 55 | procedure TFrameOptionPageCompilerProgress.chkLastCompileVersionInfoClick(Sender: TObject); 56 | begin 57 | inherited; 58 | edtLastCompileVersionInfoFormat.Enabled := chkLastCompileVersionInfo.Checked; 59 | if edtLastCompileVersionInfoFormat.Enabled then 60 | edtLastCompileVersionInfoFormat.Color := clWindow 61 | else 62 | edtLastCompileVersionInfoFormat.Color := clBtnFace; 63 | end; 64 | 65 | procedure TFrameOptionPageCompilerProgress.chkReleaseCompilerUnitCacheClick(Sender: TObject); 66 | begin 67 | inherited; 68 | chkReleaseCompilerUnitCacheHigh.Enabled := chkReleaseCompilerUnitCache.Checked; 69 | end; 70 | 71 | constructor TFrameOptionPageCompilerProgress.Create(AOwner: TComponent); 72 | {$IF CompilerVersion >= 22.0} // XE has its own option 73 | var 74 | Diff: Integer; 75 | {$IFEND} 76 | begin 77 | inherited Create(AOwner); 78 | {$IF CompilerVersion >= 22.0} // XE has its own option 79 | Diff := chkAutoSaveAfterSuccessfulCompile.Top - cbxDisableRebuildDlg.Top; 80 | cbxDisableRebuildDlg.Free; 81 | 82 | chkAutoSaveAfterSuccessfulCompile.Top := chkAutoSaveAfterSuccessfulCompile.Top - Diff; 83 | chkAskBeforeCompilingFileFromDiffernetProject.Top := chkAskBeforeCompilingFileFromDiffernetProject.Top - Diff; 84 | chkLastCompileVersionInfo.Top := chkLastCompileVersionInfo.Top - Diff; 85 | edtLastCompileVersionInfoFormat.Top := edtLastCompileVersionInfoFormat.Top - Diff; 86 | {$IFEND} 87 | {$IF CompilerVersion >= 23.0} // XE2+ changed how version info is written 88 | chkLastCompileVersionInfo.Visible := False; 89 | edtLastCompileVersionInfoFormat.Visible := False; 90 | {$IFEND} 91 | end; 92 | 93 | procedure TFrameOptionPageCompilerProgress.LoadData; 94 | begin 95 | chkReleaseCompilerUnitCache.Checked := FCompileProgress.ReleaseCompilerUnitCache; 96 | chkReleaseCompilerUnitCacheHigh.Checked := FCompileProgress.ReleaseCompilerUnitCacheHigh; 97 | chkReleaseCompilerUnitCacheHigh.Enabled := chkReleaseCompilerUnitCache.Checked; 98 | 99 | {$IF CompilerVersion < 22.0} // XE has its own option 100 | cbxDisableRebuildDlg.Checked := FCompileProgress.DisableRebuildDlg; 101 | {$IFEND} 102 | chkAutoSaveAfterSuccessfulCompile.Checked := FCompileProgress.AutoSaveAfterSuccessfulCompile; 103 | {$IF CompilerVersion < 23.0} // XE2+ changed how version info works 104 | chkLastCompileVersionInfo.Checked := FCompileProgress.LastCompileVersionInfo; 105 | edtLastCompileVersionInfoFormat.Text := FCompileProgress.LastCompileVersionInfoFormat; 106 | {$IFEND} 107 | chkAskBeforeCompilingFileFromDiffernetProject.Checked := FCompileProgress.AskCompileFromDiffProject; 108 | 109 | chkLastCompileVersionInfoClick(chkLastCompileVersionInfo); 110 | end; 111 | 112 | procedure TFrameOptionPageCompilerProgress.SaveData; 113 | begin 114 | FCompileProgress.ReleaseCompilerUnitCache := chkReleaseCompilerUnitCache.Checked; 115 | FCompileProgress.ReleaseCompilerUnitCacheHigh := chkReleaseCompilerUnitCacheHigh.Checked; 116 | {$IF CompilerVersion < 22.0} // XE has its own option 117 | FCompileProgress.DisableRebuildDlg := cbxDisableRebuildDlg.Checked; 118 | {$IFEND} 119 | FCompileProgress.AutoSaveAfterSuccessfulCompile := chkAutoSaveAfterSuccessfulCompile.Checked; 120 | {$IF CompilerVersion < 23.0} // XE2+ changed how version info works 121 | FCompileProgress.LastCompileVersionInfo := chkLastCompileVersionInfo.Checked; 122 | FCompileProgress.LastCompileVersionInfoFormat := edtLastCompileVersionInfoFormat.Text; 123 | {$IFEND} 124 | FCompileProgress.AskCompileFromDiffProject := chkAskBeforeCompilingFileFromDiffernetProject.Checked; 125 | FCompileProgress.Save; 126 | end; 127 | 128 | procedure TFrameOptionPageCompilerProgress.Selected; 129 | begin 130 | end; 131 | 132 | procedure TFrameOptionPageCompilerProgress.Unselected; 133 | begin 134 | end; 135 | 136 | end. 137 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/CompilerEnhancements/FrmeOptionPageCompilerEnhancements.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageCompilerEnhancements: TFrameOptionPageCompilerEnhancements 2 | Width = 385 3 | Height = 235 4 | TabStop = True 5 | ExplicitWidth = 385 6 | ExplicitHeight = 235 7 | inherited pnlClient: TPanel 8 | Width = 385 9 | Height = 186 10 | ExplicitWidth = 385 11 | ExplicitHeight = 186 12 | object lblExceptWarningsCaption: TLabel 13 | Left = 40 14 | Top = 54 15 | Width = 243 16 | Height = 13 17 | Caption = 'Except these warnings: (example: W1000,W1054)' 18 | FocusControl = mnoExceptWarnings 19 | end 20 | object cbxActive: TCheckBox 21 | Left = 8 22 | Top = 8 23 | Width = 113 24 | Height = 17 25 | Caption = '&Active' 26 | TabOrder = 0 27 | OnClick = cbxActiveClick 28 | end 29 | object cbxTreatWarningsAsErrors: TCheckBox 30 | Left = 24 31 | Top = 31 32 | Width = 241 33 | Height = 17 34 | Caption = 'Treat &warnings as errors' 35 | TabOrder = 1 36 | OnClick = cbxTreatWarningsAsErrorsClick 37 | end 38 | object mnoExceptWarnings: TMemo 39 | Left = 40 40 | Top = 70 41 | Width = 337 42 | Height = 89 43 | ScrollBars = ssVertical 44 | TabOrder = 2 45 | end 46 | end 47 | inherited pnlDescription: TPanel 48 | Width = 385 49 | ExplicitWidth = 385 50 | inherited bvlSplitter: TBevel 51 | Width = 385 52 | ExplicitWidth = 385 53 | end 54 | inherited lblDescription: TLabel 55 | Width = 164 56 | Caption = 'Treat compiler warnings as errors.' 57 | ExplicitWidth = 164 58 | end 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ComponentSelector/FrmeOptionPageComponentSelector.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageComponentSelector: TFrameOptionPageComponentSelector 2 | Width = 324 3 | Height = 211 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 324 7 | Height = 162 8 | object lblHotkey: TLabel 9 | Left = 24 10 | Top = 77 11 | Width = 37 12 | Height = 13 13 | Caption = '&Hotkey:' 14 | FocusControl = HotKey 15 | end 16 | object cbxActive: TCheckBox 17 | Left = 8 18 | Top = 8 19 | Width = 97 20 | Height = 17 21 | Caption = '&Active' 22 | TabOrder = 0 23 | OnClick = cbxActiveClick 24 | end 25 | object cbxSimpleSearch: TCheckBox 26 | Left = 24 27 | Top = 31 28 | Width = 97 29 | Height = 17 30 | Caption = '&Simple search' 31 | TabOrder = 1 32 | end 33 | object cbxSortByPalette: TCheckBox 34 | Left = 24 35 | Top = 54 36 | Width = 97 37 | Height = 17 38 | Caption = 'Sort by &palette' 39 | TabOrder = 2 40 | end 41 | object HotKey: THotKey 42 | Left = 24 43 | Top = 93 44 | Width = 121 45 | Height = 19 46 | HotKey = 0 47 | Modifiers = [] 48 | TabOrder = 3 49 | end 50 | end 51 | inherited pnlDescription: TPanel 52 | Width = 324 53 | inherited bvlSplitter: TBevel 54 | Width = 324 55 | end 56 | inherited lblDescription: TLabel 57 | Width = 205 58 | Caption = 'Configures the ComponentSelected toolbar.' 59 | end 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ComponentSelector/FrmeOptionPageComponentSelector.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmeOptionPageComponentSelector; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 17 | StdCtrls, ComponentSelector, FrmTreePages, ComCtrls, FrmeBase, ExtCtrls; 18 | 19 | type 20 | TFrameOptionPageComponentSelector = class(TFrameBase, ITreePageComponent) 21 | cbxSimpleSearch: TCheckBox; 22 | cbxSortByPalette: TCheckBox; 23 | cbxActive: TCheckBox; 24 | HotKey: THotKey; 25 | lblHotkey: TLabel; 26 | procedure cbxActiveClick(Sender: TObject); 27 | private 28 | { Private-Deklarationen } 29 | FComponentSelector: TComponentSelector; 30 | public 31 | { Public-Deklarationen } 32 | procedure SetUserData(UserData: TObject); 33 | procedure LoadData; 34 | procedure SaveData; 35 | procedure Selected; 36 | procedure Unselected; 37 | end; 38 | 39 | implementation 40 | 41 | {$R *.dfm} 42 | 43 | { TFrameOptionPageComponentSelector } 44 | 45 | procedure TFrameOptionPageComponentSelector.SetUserData(UserData: TObject); 46 | begin 47 | FComponentSelector := UserData as TComponentSelector; 48 | end; 49 | 50 | procedure TFrameOptionPageComponentSelector.LoadData; 51 | begin 52 | cbxActive.Checked := FComponentSelector.ToolBar.Visible; 53 | cbxSimpleSearch.Checked := FComponentSelector.Edit.CheckBoxSimpleSearch.Checked; 54 | cbxSortByPalette.Checked := FComponentSelector.Edit.CheckBoxPaletteSort.Checked; 55 | HotKey.HotKey := FComponentSelector.Hotkey; 56 | 57 | cbxActiveClick(cbxActive); 58 | end; 59 | 60 | procedure TFrameOptionPageComponentSelector.SaveData; 61 | begin 62 | FComponentSelector.ToolBar.Visible := cbxActive.Checked; 63 | FComponentSelector.Edit.CheckBoxSimpleSearch.Checked := cbxSimpleSearch.Checked; 64 | FComponentSelector.Edit.CheckBoxPaletteSort.Checked := cbxSortByPalette.Checked; 65 | FComponentSelector.Hotkey := HotKey.HotKey; 66 | FComponentSelector.SaveToolbarConfig; 67 | end; 68 | 69 | procedure TFrameOptionPageComponentSelector.Selected; 70 | begin 71 | end; 72 | 73 | procedure TFrameOptionPageComponentSelector.Unselected; 74 | begin 75 | end; 76 | 77 | procedure TFrameOptionPageComponentSelector.cbxActiveClick(Sender: TObject); 78 | begin 79 | cbxSimpleSearch.Enabled := cbxActive.Checked; 80 | cbxSortByPalette.Enabled := cbxActive.Checked; 81 | lblHotkey.Enabled := cbxActive.Checked; 82 | HotKey.Enabled := cbxActive.Checked; 83 | end; 84 | 85 | end. 86 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/DSUFeatures/DSUFeatures.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/DSUFeatures/DSUFeatures.pas -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/DSUFeatures/FrmeOptionPageDSUFeatures.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageDSUFeatures: TFrameOptionPageDSUFeatures 2 | Width = 385 3 | Height = 366 4 | TabStop = True 5 | ExplicitWidth = 385 6 | ExplicitHeight = 366 7 | inherited pnlClient: TPanel 8 | Width = 385 9 | Height = 317 10 | ExplicitWidth = 385 11 | ExplicitHeight = 317 12 | object lblEditorTabDblClickAction: TLabel 13 | Left = 8 14 | Top = 216 15 | Width = 140 16 | Height = 13 17 | Caption = 'Editor tab double click action:' 18 | FocusControl = cbxEditorTabDblClickAction 19 | end 20 | object LabelStructureViewSearchHotkey: TLabel 21 | Left = 8 22 | Top = 259 23 | Width = 142 24 | Height = 13 25 | Caption = 'Structure View Search hotkey' 26 | FocusControl = HotKeyStructureViewSearch 27 | end 28 | object chkDisablePackageCache: TCheckBox 29 | Left = 8 30 | Top = 8 31 | Width = 337 32 | Height = 17 33 | Caption = 'Disable Package Cache (requires IDE restart)' 34 | TabOrder = 0 35 | end 36 | object cbxEditorTabDblClickAction: TComboBox 37 | Left = 8 38 | Top = 232 39 | Width = 140 40 | Height = 21 41 | Style = csDropDownList 42 | TabOrder = 11 43 | Items.Strings = ( 44 | 'Disabled' 45 | 'Zoom' 46 | 'Super-Zoom') 47 | end 48 | object chkDisableSourceFormatterHotkey: TCheckBox 49 | Left = 8 50 | Top = 31 51 | Width = 337 52 | Height = 17 53 | Caption = 'Disable Source Formatter hotkey (Ctrl+D)' 54 | TabOrder = 2 55 | end 56 | object chkShowFileProjectInPrjMgr: TCheckBox 57 | Left = 8 58 | Top = 54 59 | Width = 337 60 | Height = 17 61 | Caption = 'Show project for active file in Project Manager' 62 | TabOrder = 3 63 | end 64 | object HotKeyStructureViewSearch: THotKey 65 | Left = 8 66 | Top = 274 67 | Width = 121 68 | Height = 19 69 | HotKey = 0 70 | Modifiers = [] 71 | TabOrder = 12 72 | end 73 | object chkIncBuildNumOnBuildOnly: TCheckBox 74 | Left = 8 75 | Top = 299 76 | Width = 337 77 | Height = 17 78 | Caption = 'Increment Build Number only when building the project' 79 | TabOrder = 8 80 | end 81 | object chkDisableCodeFolding: TCheckBox 82 | Left = 8 83 | Top = 39 84 | Width = 337 85 | Height = 17 86 | Caption = 'Disable Code Folding (better performance for large units)' 87 | TabOrder = 1 88 | end 89 | object chkReplaceOpenFileAtCursor: TCheckBox 90 | Left = 8 91 | Top = 77 92 | Width = 337 93 | Height = 17 94 | Caption = 'Replace Open File At Cursor (Projectgroup support)' 95 | TabOrder = 4 96 | end 97 | object chkShowAllFrames: TCheckBox 98 | Left = 8 99 | Top = 100 100 | Width = 337 101 | Height = 17 102 | Caption = 'Show all inheritable modules (Projectgroup support)' 103 | TabOrder = 5 104 | end 105 | object chkDontBreakOnSpawnedProcesses: TCheckBox 106 | Left = 8 107 | Top = 123 108 | Width = 337 109 | Height = 17 110 | Hint = 111 | 'The debugger breaks the application when a spawned process is st' + 112 | 'arted.'#13#10'With this option you can disable this "feature", so you ' + 113 | 'do not have to'#13#10'resume the process after a CreateProcess call.' 114 | Caption = 'Don'#39't break when starting spawned processes' 115 | ParentShowHint = False 116 | ShowHint = True 117 | TabOrder = 6 118 | end 119 | object chkKillDExplore: TCheckBox 120 | Left = 8 121 | Top = 146 122 | Width = 337 123 | Height = 17 124 | Hint = 125 | 'Document Explorer (dexplore.exe) that is used to show the contex' + 126 | 't help,'#13#10'sometimes isn'#39't terminated what prevents Windows from s' + 127 | 'hutting down.'#13#10'If this option is active, all running dexplore.ex' + 128 | 'e will be terminated when'#13#10'the IDE is closed.' 129 | Caption = 'Kill all dexplore.exe when closing the IDE' 130 | ParentShowHint = False 131 | ShowHint = True 132 | TabOrder = 7 133 | end 134 | object chkConfirmDlgOnDebugCtrlF1: TCheckBox 135 | Left = 8 136 | Top = 169 137 | Width = 337 138 | Height = 17 139 | Hint = 140 | 'During debugging sometimes it happens that you press Ctrl+F1 (He' + 141 | 'lp) instead of'#13#10'Ctrl+F2 (Stop) and then you have to wait for dex' + 142 | 'plore.exe to start.'#13#10'If this option is active, Ctrl+F1 will show' + 143 | ' a confirmation dialog before invoking the help.' 144 | Caption = 'Show confirmation dialog for Ctrl+F1 while debugging' 145 | ParentShowHint = False 146 | ShowHint = True 147 | TabOrder = 9 148 | end 149 | object chkDisableAlphaSortClassCompletion: TCheckBox 150 | Left = 8 151 | Top = 192 152 | Width = 337 153 | Height = 17 154 | Caption = 'Disable alpha-sort class completion' 155 | ParentShowHint = False 156 | ShowHint = True 157 | TabOrder = 10 158 | end 159 | end 160 | inherited pnlDescription: TPanel 161 | Width = 385 162 | ExplicitWidth = 385 163 | inherited bvlSplitter: TBevel 164 | Width = 385 165 | ExplicitWidth = 385 166 | end 167 | inherited lblDescription: TLabel 168 | Width = 157 169 | Caption = 'Configure extended IDE settings' 170 | ExplicitWidth = 157 171 | end 172 | end 173 | end 174 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/DelphiExtension.inc: -------------------------------------------------------------------------------- 1 | {$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1} 2 | 3 | {$IFDEF CONDITIONALEXPRESSIONS} 4 | {$IFDEF VER185} 5 | {$DEFINE COMPILER105} 6 | {$DEFINE DELPHI2007} 7 | {$DEFINE VER180} 8 | {$DEFINE COMPILER10} 9 | {$ENDIF VER185} 10 | 11 | {$IF CompilerVersion >= 18.5} 12 | {$DEFINE COMPILER105_UP} 13 | {$DEFINE DELPHI2007_UP} 14 | {$IFEND} 15 | {$ENDIF} 16 | 17 | {$I ..\jedi\jedi.inc} 18 | 19 | {$DEFINE DDEVEXTENSIONS} 20 | 21 | {$IFDEF COMPILER7_UP} 22 | {$WARN UNSAFE_TYPE OFF} 23 | {$WARN UNSAFE_CODE OFF} 24 | {$WARN UNSAFE_CAST OFF} 25 | {$ENDIF} 26 | 27 | {$IFDEF VER185} 28 | {$DEFINE IDE50} 29 | {$DEFINE IDE50_UP} 30 | {$ENDIF} 31 | {$IFDEF COMPILER11_UP} 32 | {$DEFINE IDE50} 33 | {$DEFINE IDE50_UP} 34 | {$ENDIF} 35 | 36 | {$IFDEF RELEASE} 37 | {$D-} 38 | {$ENDIF} 39 | 40 | {------------------------------------------------------------------------------} 41 | {$DEFINE INCLUDE_PROJECTSETTINGS} 42 | {$DEFINE INCLUDE_COMPILEPROGRESS} 43 | {$DEFINE INCLUDE_IDEMENUHANDLER} // BDS IDE bugfix: Alt+F12 key bugfix 44 | {$DEFINE INCLUDE_UNITSELECTOR} 45 | {$DEFINE INCLUDE_KEYBINDINGS} 46 | {$DEFINE INCLUDE_FILECLEANER} 47 | {$DEFINE INCLUDE_COMPILEBACKUP} 48 | {$DEFINE INCLUDE_FOCUSEDITOR} 49 | {$DEFINE INCLUDE_FORMDESIGNER} // 1.4 50 | {$DEFINE INCLUDE_STARTPARAMETERTEAM} // 1.5 51 | {$DEFINE INCLUDE_FILESELECTOR} // 1.5 52 | {$DEFINE INCLUDE_STRUCVIEWSEARCH} // 2.0 53 | {$DEFINE INCLUDE_COMPONENTSELECTOR} 54 | {$DEFINE INCLUDE_OLDPALETTE} 55 | 56 | {------------------------------------------------------------------------------} 57 | // dependencies 58 | 59 | {$IFDEF INCLUDE_COMPONENTSELECTOR} 60 | {$DEFINE NEED_COMPONENTMANAGER} 61 | {$ENDIF} 62 | 63 | {$IFDEF INCLUDE_OLDPALETTE} 64 | {$DEFINE NEED_COMPONENTMANAGER} 65 | {$ENDIF} 66 | 67 | {------------------------------------------------------------------------------} 68 | // version limitations 69 | 70 | {$DEFINE ALWAYS_DEFINED} 71 | 72 | {$IF CompilerVersion > 23.0} // XE2+ 73 | {$UNDEF INCLUDE_STARTPARAMETERTEAM} // XE2's StartParameter are configuration-aware 74 | {$IFEND} 75 | 76 | {------------------------------------------------------------------------------} 77 | 78 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/DtmImages.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit DtmImages; 10 | 11 | {$I DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | SysUtils, Classes, ImgList, Controls, Forms; 17 | 18 | type 19 | TDataModuleImages = class(TDataModule) 20 | imlIcons: TImageList; 21 | imlFilter: TImageList; 22 | imlModules: TImageList; 23 | imlApplications: TImageList; 24 | private 25 | { Private-Deklarationen } 26 | public 27 | { Public-Deklarationen } 28 | end; 29 | 30 | var 31 | DataModuleImages: TDataModuleImages; 32 | 33 | const 34 | imgModuleUnit = 0; 35 | imgModuleForm = 1; 36 | imgModuleFrame = 2; 37 | imgModuleDataModule = 3; 38 | imgModuleInheritForm = 4; 39 | imgModuleBinary = 5; 40 | 41 | implementation 42 | 43 | {$R *.dfm} 44 | 45 | end. 46 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Editor/CodeInsightHandling.pas: -------------------------------------------------------------------------------- 1 | unit CodeInsightHandling; 2 | 3 | { 4 | IDE Version: 2009+ 5 | 6 | Allows the TAB key to close the code insight window (like the ENTER key) 7 | } 8 | 9 | interface 10 | 11 | procedure InitPlugin(Unload: Boolean); 12 | 13 | implementation 14 | 15 | uses 16 | Windows, Hooking, IDEHooks; 17 | 18 | procedure TIDEPopupListBox_EditorKey(Instance: TObject; Sender: TObject; var Key: Char); 19 | external coreide_bpl name '@Idepopuplistbox@TIDEPopupListBox@EditorKey$qqrp14System@TObjectrb'; 20 | 21 | var 22 | OrgIDEPopupListBox_EditorKey: procedure(Instance: TObject; Sender: TObject; var Key: Char); 23 | IDEPopupListBox_EditorKeyHooked: Boolean = False; 24 | 25 | procedure HookedIDEPopupListBox_EditorKey(Instance: TObject; Sender: TObject; var Key: Char); 26 | begin 27 | if Key = #9 then 28 | Key := #13; 29 | OrgIDEPopupListBox_EditorKey(Instance, Sender, Key); 30 | end; 31 | 32 | procedure InitPlugin(Unload: Boolean); 33 | begin 34 | if not Unload then 35 | begin 36 | if not Assigned(OrgIDEPopupListBox_EditorKey) then 37 | @OrgIDEPopupListBox_EditorKey := RedirectOrgCall(@TIDEPopupListBox_EditorKey, @HookedIDEPopupListBox_EditorKey) 38 | else 39 | RedirectOrg(@TIDEPopupListBox_EditorKey, @HookedIDEPopupListBox_EditorKey); 40 | end 41 | else 42 | RestoreOrgCall(@TIDEPopupListBox_EditorKey, @OrgIDEPopupListBox_EditorKey); 43 | end; 44 | 45 | 46 | end. 47 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Editor/FocusEditor.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FocusEditor; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | { 16 | Sets the focus to the editor window when the desktop settings were changed. 17 | } 18 | 19 | uses 20 | SysUtils, Classes, Forms, Controls, IDEHooks, Hooking; 21 | 22 | procedure InitPlugin(Unload: Boolean); 23 | 24 | implementation 25 | 26 | uses 27 | IDEUtils; 28 | 29 | var 30 | LoadDesktopHook: TRedirectCode; 31 | 32 | procedure Hook_LoadDesktop(Instance: TObject; Desktop: TObject); 33 | type 34 | TLoadDesktopProc = procedure(Instance: TObject; Desktop: TObject); 35 | var 36 | I: Integer; 37 | Editor: TComponent; 38 | begin 39 | UnhookFunction(LoadDesktopHook); 40 | try 41 | try 42 | TLoadDesktopProc(LoadDesktopHook.RealProc)(Instance, Desktop); 43 | finally 44 | for I := 0 to Screen.FormCount - 1 do 45 | begin 46 | if Screen.Forms[I].Visible and Screen.Forms[I].Enabled and 47 | Screen.Forms[I].CanFocus and 48 | Screen.Forms[I].ClassNameIs('TEditWindow') then 49 | begin 50 | Editor := Screen.Forms[I].FindComponent('Editor'); 51 | if (Editor is TWinControl) and TWinControl(Editor).CanFocus then 52 | TWinControl(Editor).SetFocus; 53 | Break; 54 | end; 55 | end; 56 | end; 57 | finally 58 | RehookFunction(@Hook_LoadDesktop, LoadDesktopHook); 59 | end; 60 | end; 61 | 62 | procedure InitPlugin(Unload: Boolean); 63 | begin 64 | if not Unload then 65 | HookFunction(coreide_bpl, '@Desktop@TDesktopStates@LoadDesktop$qqrp21Desktop@TDesktopState', 66 | @Hook_LoadDesktop, LoadDesktopHook) 67 | else 68 | UnhookFunction(LoadDesktopHook); 69 | end; 70 | 71 | end. 72 | 73 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ExcelExport/FrmExcelExport.dfm: -------------------------------------------------------------------------------- 1 | object FormExcelExport: TFormExcelExport 2 | Left = 407 3 | Top = 365 4 | BorderIcons = [biMinimize, biMaximize] 5 | BorderStyle = bsDialog 6 | Caption = 'Excel Export' 7 | ClientHeight = 59 8 | ClientWidth = 428 9 | Color = clBtnFace 10 | Font.Charset = DEFAULT_CHARSET 11 | Font.Color = clWindowText 12 | Font.Height = -11 13 | Font.Style = [] 14 | OldCreateOrder = False 15 | Position = poScreenCenter 16 | OnCloseQuery = FormCloseQuery 17 | OnPaint = FormPaint 18 | PixelsPerInch = 96 19 | TextHeight = 13 20 | object LblExportText: TLabel 21 | Left = 8 22 | Top = 8 23 | Width = 99 24 | Height = 13 25 | Caption = 'Exporting to Excel...' 26 | Transparent = False 27 | end 28 | object ProgressBar: TProgressBar 29 | Left = 8 30 | Top = 27 31 | Width = 412 32 | Height = 17 33 | TabOrder = 0 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ExcelExport/FrmExcelExport.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmExcelExport; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | {$IFDEF COMPILER6_UP} 17 | Variants, 18 | {$ENDIF COMPILER6_UP} 19 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 20 | Dialogs, ComCtrls, StdCtrls, ComObj; 21 | 22 | type 23 | TFormExcelExport = class(TForm) 24 | LblExportText: TLabel; 25 | ProgressBar: TProgressBar; 26 | procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); 27 | procedure FormPaint(Sender: TObject); 28 | private 29 | FName: string; 30 | FListView: TListView; 31 | FFilename: string; 32 | { Private-Deklarationen } 33 | public 34 | { Public-Deklarationen } 35 | class procedure ExportListView(const AName: string; AListView: TListView; 36 | const AFilename: string = ''); 37 | end; 38 | 39 | procedure ExportListViewToExcel(const Name: string; ListView: TListView; 40 | const Filename: string = ''; ProgressBar: TProgressBar = nil); 41 | 42 | implementation 43 | 44 | {$R *.dfm} 45 | 46 | procedure ExportListViewToExcel(const Name: string; ListView: TListView; 47 | const Filename: string = ''; ProgressBar: TProgressBar = nil); 48 | var 49 | ExcelApp: Variant; 50 | Workbook: Variant; 51 | Sheet: Variant; 52 | i: Integer; 53 | Cell: string; 54 | k: Integer; 55 | begin 56 | if Assigned(ProgressBar) then 57 | begin 58 | ProgressBar.Position := 0; 59 | ProgressBar.Max := 100; 60 | end; 61 | 62 | if Filename <> '' then 63 | ExcelApp := CreateOleObject('Excel.Application') 64 | else 65 | begin 66 | ExcelApp := CreateOleObject('Excel.Application'); 67 | { try 68 | ExcelApp := GetActiveOleObject('Excel.Application'); 69 | except 70 | ExcelApp := CreateOleObject('Excel.Application'); 71 | end;} 72 | end; 73 | ExcelApp.ScreenUpdating := False; 74 | try 75 | Workbook := ExcelApp.Workbooks.Add; 76 | Sheet := Workbook.Sheets.Add; 77 | Sheet.Name := Name; 78 | 79 | with ListView do 80 | begin 81 | for i := 0 to Columns.Count - 1 do 82 | begin 83 | Cell := Char(Ord('A') + i) + '1'; 84 | Sheet.Range[Cell + ':' + Cell].Formula := Columns[i].Caption; 85 | Sheet.Range[Cell + ':' + Cell].Font.Bold := True; 86 | Sheet.Range[Cell + ':' + Cell].ColumnWidth := Columns[i].Width / 6; 87 | end; 88 | for i := 0 to Items.Count - 1 do 89 | begin 90 | for k := 0 to Columns.Count - 1 do 91 | begin 92 | Cell := Char(Ord('A') + k) + IntToStr(1 + i + 1); 93 | if k = 0 then 94 | Sheet.Range[Cell + ':' + Cell].Formula := Items[i].Caption 95 | else 96 | Sheet.Range[Cell + ':' + Cell].Formula := Items[i].SubItems[k - 1]; 97 | end; 98 | if Assigned(ProgressBar) and (i mod 25 = 0) then 99 | begin 100 | ProgressBar.Position := i * 100 div Items.Count; 101 | Application.ProcessMessages; 102 | end; 103 | end; 104 | end; 105 | if Assigned(ProgressBar) then 106 | ProgressBar.Position := ProgressBar.Max; 107 | finally 108 | ExcelApp.ScreenUpdating := True; 109 | if Filename <> '' then 110 | begin 111 | Workbook.SaveAs(Filename); 112 | ExcelApp.Quit; 113 | end 114 | else 115 | ExcelApp.Visible := True; 116 | 117 | Sheet := Unassigned; 118 | Workbook := Unassigned; 119 | ExcelApp := Unassigned; 120 | end; 121 | end; 122 | 123 | 124 | class procedure TFormExcelExport.ExportListView(const AName: string; 125 | AListView: TListView; const AFilename: string); 126 | begin 127 | with TFormExcelExport.Create(Application) do 128 | try 129 | FName := AName; 130 | FListView := AListView; 131 | FFilename := AFilename; 132 | ProgressBar.Position := 0; 133 | ProgressBar.Max := 100; 134 | ShowModal; 135 | finally 136 | Free; 137 | end; 138 | end; 139 | 140 | procedure TFormExcelExport.FormCloseQuery(Sender: TObject; 141 | var CanClose: Boolean); 142 | begin 143 | CanClose := ModalResult <> mrCancel; 144 | end; 145 | 146 | procedure TFormExcelExport.FormPaint(Sender: TObject); 147 | begin 148 | OnPaint := nil; 149 | Repaint; 150 | try 151 | ExportListViewToExcel(FName, FListView, FFilename, ProgressBar); 152 | finally 153 | ModalResult := mrOk; 154 | end; 155 | end; 156 | 157 | end. 158 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FileCleaner/FrmeOptionPageFileCleaner.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageFileCleaner: TFrameOptionPageFileCleaner 2 | Width = 385 3 | Height = 200 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 385 7 | Height = 151 8 | object cbxActive: TCheckBox 9 | Left = 8 10 | Top = 8 11 | Width = 113 12 | Height = 17 13 | Caption = '&Active' 14 | TabOrder = 0 15 | OnClick = cbxActiveClick 16 | end 17 | object cbxDeleteDdp: TCheckBox 18 | Left = 24 19 | Top = 31 20 | Width = 177 21 | Height = 17 22 | Caption = 'Automatically delete .ddp files' 23 | TabOrder = 1 24 | end 25 | object cbxRemoveEmptyHistory: TCheckBox 26 | Left = 24 27 | Top = 77 28 | Width = 257 29 | Height = 17 30 | Caption = 'Automatically delete empty "__history" directories' 31 | TabOrder = 2 32 | Visible = False 33 | end 34 | object cbxRemoveEmptyModel: TCheckBox 35 | Left = 24 36 | Top = 54 37 | Width = 257 38 | Height = 17 39 | Caption = 'Automatically delete empty "Model" directories' 40 | TabOrder = 3 41 | Visible = False 42 | end 43 | end 44 | inherited pnlDescription: TPanel 45 | Width = 385 46 | inherited bvlSplitter: TBevel 47 | Width = 385 48 | end 49 | inherited lblDescription: TLabel 50 | Width = 174 51 | Caption = 'Configure the automatic file deleter.' 52 | end 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FileCleaner/FrmeOptionPageFileCleaner.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmeOptionPageFileCleaner; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 17 | Dialogs, ToolsAPI, FrmTreePages, PluginConfig, StdCtrls, 18 | ModuleData, FrmeBase, ExtCtrls; 19 | 20 | type 21 | TFileCleaner = class(TPluginConfig) 22 | private 23 | FModuleNotifier: TModuleDataNotifier; 24 | FActive: Boolean; 25 | FRemoveEmptyHistory: Boolean; 26 | FDeleteDdp: Boolean; 27 | FRemoveEmptyModel: Boolean; 28 | protected 29 | function GetOptionPages: TTreePage; override; 30 | procedure Init; override; 31 | procedure DoModuleAfterSave(Data: TModuleData); virtual; 32 | public 33 | constructor Create; 34 | destructor Destroy; override; 35 | published 36 | property Active: Boolean read FActive write FActive; 37 | property DeleteDdp: Boolean read FDeleteDdp write FDeleteDdp; 38 | property RemoveEmptyHistory: Boolean read FRemoveEmptyHistory write FRemoveEmptyHistory; 39 | property RemoveEmptyModel: Boolean read FRemoveEmptyModel write FRemoveEmptyModel; 40 | end; 41 | 42 | TFrameOptionPageFileCleaner = class(TFrameBase, ITreePageComponent) 43 | cbxActive: TCheckBox; 44 | cbxDeleteDdp: TCheckBox; 45 | cbxRemoveEmptyModel: TCheckBox; 46 | cbxRemoveEmptyHistory: TCheckBox; 47 | procedure cbxActiveClick(Sender: TObject); 48 | private 49 | { Private-Deklarationen } 50 | FFileCleaner: TFileCleaner; 51 | public 52 | { Public-Deklarationen } 53 | procedure SetUserData(UserData: TObject); 54 | procedure LoadData; 55 | procedure SaveData; 56 | procedure Selected; 57 | procedure Unselected; 58 | end; 59 | 60 | procedure InitPlugin(Unload: Boolean); 61 | 62 | implementation 63 | 64 | uses 65 | Main; 66 | 67 | {$R *.dfm} 68 | 69 | var 70 | FileCleaner: TFileCleaner; 71 | 72 | procedure InitPlugin(Unload: Boolean); 73 | begin 74 | if not Unload then 75 | FileCleaner := TFileCleaner.Create 76 | else 77 | FreeAndNil(FileCleaner); 78 | end; 79 | 80 | { TFrameOptionPageFileCleaner } 81 | 82 | procedure TFrameOptionPageFileCleaner.cbxActiveClick(Sender: TObject); 83 | begin 84 | cbxDeleteDdp.Enabled := cbxActive.Checked; 85 | cbxRemoveEmptyModel.Enabled := cbxActive.Checked; 86 | cbxRemoveEmptyHistory.Enabled := cbxActive.Checked; 87 | end; 88 | 89 | procedure TFrameOptionPageFileCleaner.SetUserData(UserData: TObject); 90 | begin 91 | FFileCleaner := UserData as TFileCleaner; 92 | end; 93 | 94 | procedure TFrameOptionPageFileCleaner.LoadData; 95 | begin 96 | cbxActive.Checked := FFileCleaner.Active; 97 | cbxDeleteDdp.Checked := FFileCleaner.DeleteDdp; 98 | cbxRemoveEmptyModel.Checked := FFileCleaner.RemoveEmptyModel; 99 | cbxRemoveEmptyHistory.Checked := FFileCleaner.RemoveEmptyHistory; 100 | {$IFDEF COMPILER9_UP} 101 | cbxRemoveEmptyModel.Visible := True; 102 | {$ENDIF COMPILER9_UP} 103 | {$IFDEF COMPILER10_UP} 104 | cbxRemoveEmptyHistory.Visible := True; 105 | {$ENDIF COMPILER10_UP} 106 | 107 | cbxActiveClick(cbxActive); 108 | end; 109 | 110 | procedure TFrameOptionPageFileCleaner.SaveData; 111 | begin 112 | FFileCleaner.DeleteDdp := cbxDeleteDdp.Checked; 113 | FFileCleaner.RemoveEmptyHistory := cbxRemoveEmptyHistory.Checked; 114 | FFileCleaner.RemoveEmptyModel := cbxRemoveEmptyModel.Checked; 115 | 116 | FFileCleaner.Active := cbxActive.Checked; 117 | FFileCleaner.Save; 118 | end; 119 | 120 | procedure TFrameOptionPageFileCleaner.Selected; 121 | begin 122 | end; 123 | 124 | procedure TFrameOptionPageFileCleaner.Unselected; 125 | begin 126 | end; 127 | 128 | { TFileCleaner } 129 | 130 | constructor TFileCleaner.Create; 131 | begin 132 | inherited Create(AppDataDirectory + '\FileCleaner.xml', 'FileCleaner'); 133 | 134 | FModuleNotifier := TModuleDataNotifier.Create; 135 | FModuleNotifier.AfterSave := DoModuleAfterSave; 136 | end; 137 | 138 | destructor TFileCleaner.Destroy; 139 | begin 140 | FModuleNotifier.Free; 141 | Active := False; 142 | inherited Destroy; 143 | end; 144 | 145 | procedure TFileCleaner.Init; 146 | begin 147 | inherited Init; 148 | DeleteDdp := False; 149 | RemoveEmptyHistory := True; 150 | RemoveEmptyModel := True; 151 | Active := True; 152 | end; 153 | 154 | function TFileCleaner.GetOptionPages: TTreePage; 155 | begin 156 | Result := TTreePage.Create('File Cleaner', TFrameOptionPageFileCleaner, Self); 157 | end; 158 | 159 | procedure TFileCleaner.DoModuleAfterSave(Data: TModuleData); 160 | var 161 | Ext: string; 162 | Filename: string; 163 | IsProjectExt: Boolean; 164 | begin 165 | if Active then 166 | begin 167 | Filename := Data.Module.FileName; 168 | Ext := AnsiLowerCase(ExtractFileExt(FileName)); 169 | IsProjectExt := (Ext = '.dpr') or (Ext = '.dpk') or (Ext = '.bpr') or (Ext = '.bpk') or (Ext = '.bdsproj'); 170 | if (Ext = '.pas') or (Ext = '.cpp') or (Ext = '.dfm') or (Ext = '.nfm') or (Ext = '.xfm') or (Ext = '.h') or 171 | IsProjectExt then 172 | begin 173 | if DeleteDdp and not IsProjectExt then 174 | DeleteFile(ChangeFileExt(FileName, '.ddp')); 175 | {$IFDEF COMPILER9_UP} 176 | if RemoveEmptyModel then 177 | begin 178 | RemoveDir(ExtractFilePath(FileName) + 'Modell'); 179 | RemoveDir(ExtractFilePath(FileName) + 'Model'); 180 | end; 181 | {$ENDIF COMPILER9_UP} 182 | {$IFDEF COMPILER10_UP} 183 | if RemoveEmptyHistory then 184 | RemoveDir(ExtractFilePath(FileName) + '__history'); 185 | {$ENDIF COMPILER10_UP} 186 | end; 187 | end; 188 | end; 189 | 190 | end. 191 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FocusEditor/FocusEditor.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FocusEditor; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | { 16 | Sets the focus to the editor window when the desktop settings were changed. 17 | } 18 | 19 | uses 20 | SysUtils, Classes, Forms, Controls, IDEHooks, Hooking; 21 | 22 | procedure InitPlugin(Unload: Boolean); 23 | 24 | implementation 25 | 26 | uses 27 | IDEUtils; 28 | 29 | var 30 | LoadDesktopHook: TRedirectCode; 31 | 32 | procedure Hook_LoadDesktop(Instance: TObject; Desktop: TObject); 33 | type 34 | TLoadDesktopProc = procedure(Instance: TObject; Desktop: TObject); 35 | var 36 | I: Integer; 37 | Editor: TComponent; 38 | begin 39 | UnhookFunction(LoadDesktopHook); 40 | try 41 | try 42 | TLoadDesktopProc(LoadDesktopHook.RealProc)(Instance, Desktop); 43 | finally 44 | for I := 0 to Screen.FormCount - 1 do 45 | begin 46 | if (Screen.Forms[I].ClassName = 'TEditWindow') and 47 | Screen.Forms[I].Visible and Screen.Forms[I].Enabled and 48 | Screen.Forms[I].CanFocus then 49 | begin 50 | Editor := Screen.Forms[I].FindComponent('Editor'); 51 | if (Editor is TWinControl) and TWinControl(Editor).CanFocus then 52 | TWinControl(Editor).SetFocus; 53 | Break; 54 | end; 55 | end; 56 | end; 57 | finally 58 | RehookFunction(@Hook_LoadDesktop, LoadDesktopHook); 59 | end; 60 | end; 61 | 62 | procedure InitPlugin(Unload: Boolean); 63 | begin 64 | if not Unload then 65 | HookFunction(coreide_bpl, '@Desktop@TDesktopStates@LoadDesktop$qqrp21Desktop@TDesktopState', 66 | @Hook_LoadDesktop, LoadDesktopHook) 67 | else 68 | UnhookFunction(LoadDesktopHook); 69 | end; 70 | 71 | end. 72 | 73 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FormDesignerHelpers/FrmeOptionPageFormDesigner.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageFormDesigner: TFrameOptionPageFormDesigner 2 | Width = 372 3 | Height = 175 4 | ParentFont = False 5 | inherited pnlClient: TPanel 6 | Width = 372 7 | Height = 126 8 | object cbxActive: TCheckBox 9 | Left = 8 10 | Top = 8 11 | Width = 113 12 | Height = 17 13 | Caption = '&Active' 14 | TabOrder = 0 15 | OnClick = cbxActiveClick 16 | end 17 | object cbxLabelMargin: TCheckBox 18 | Left = 24 19 | Top = 31 20 | Width = 313 21 | Height = 17 22 | Caption = 'Set TLabel.Margins.Bottom to zero' 23 | TabOrder = 1 24 | end 25 | object chkRemoveExplicitProperties: TCheckBox 26 | Left = 24 27 | Top = 54 28 | Width = 313 29 | Height = 17 30 | Caption = 'Do not store the Explicit* properties into the DFM' 31 | TabOrder = 2 32 | end 33 | end 34 | inherited pnlDescription: TPanel 35 | Width = 372 36 | inherited bvlSplitter: TBevel 37 | Width = 372 38 | end 39 | inherited lblDescription: TLabel 40 | Width = 212 41 | Caption = 'Configure the form designer enhancements.' 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FormDesignerHelpers/FrmeOptionPageFormDesigner.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmeOptionPageFormDesigner; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 17 | Dialogs, ToolsAPI, FrmTreePages, PluginConfig, StdCtrls, 18 | ModuleData, FrmeBase, ExtCtrls; 19 | 20 | type 21 | TFormDesigner = class(TPluginConfig) 22 | private 23 | FActive: Boolean; 24 | FLabelMargin: Boolean; 25 | FRemoveExplicitProperty: Boolean; 26 | procedure SetActive(const Value: Boolean); 27 | procedure SetLabelMargin(const Value: Boolean); 28 | procedure SetRemoveExplicitProperty(const Value: Boolean); 29 | protected 30 | function GetOptionPages: TTreePage; override; 31 | procedure Init; override; 32 | public 33 | constructor Create; 34 | destructor Destroy; override; 35 | procedure UpdateHooks; 36 | published 37 | property Active: Boolean read FActive write SetActive; 38 | property LabelMargin: Boolean read FLabelMargin write SetLabelMargin; 39 | property RemoveExplicitProperty: Boolean read FRemoveExplicitProperty write SetRemoveExplicitProperty; 40 | end; 41 | 42 | TFrameOptionPageFormDesigner = class(TFrameBase, ITreePageComponent) 43 | cbxActive: TCheckBox; 44 | cbxLabelMargin: TCheckBox; 45 | chkRemoveExplicitProperties: TCheckBox; 46 | procedure cbxActiveClick(Sender: TObject); 47 | private 48 | { Private-Deklarationen } 49 | FFormDesigner: TFormDesigner; 50 | public 51 | { Public-Deklarationen } 52 | procedure SetUserData(UserData: TObject); 53 | procedure LoadData; 54 | procedure SaveData; 55 | procedure Selected; 56 | procedure Unselected; 57 | end; 58 | 59 | {$IFDEF INCLUDE_FORMDESIGNER} 60 | 61 | procedure InitPlugin(Unload: Boolean); 62 | 63 | {$ENDIF INCLUDE_FORMDESIGNER} 64 | 65 | implementation 66 | 67 | uses 68 | Main, LabelMarginHelper, RemoveExplicitProperty; 69 | 70 | {$R *.dfm} 71 | 72 | {$IFDEF INCLUDE_FORMDESIGNER} 73 | 74 | var 75 | FormDesigner: TFormDesigner; 76 | 77 | procedure InitPlugin(Unload: Boolean); 78 | begin 79 | if not Unload then 80 | FormDesigner := TFormDesigner.Create 81 | else 82 | FreeAndNil(FormDesigner); 83 | end; 84 | 85 | {$ENDIF INCLUDE_FORMDESIGNER} 86 | 87 | { TFrameOptionPageFormDesigner } 88 | 89 | procedure TFrameOptionPageFormDesigner.cbxActiveClick(Sender: TObject); 90 | begin 91 | cbxLabelMargin.Enabled := cbxActive.Checked; 92 | chkRemoveExplicitProperties.Enabled := cbxActive.Checked; 93 | end; 94 | 95 | procedure TFrameOptionPageFormDesigner.SetUserData(UserData: TObject); 96 | begin 97 | FFormDesigner := UserData as TFormDesigner; 98 | end; 99 | 100 | procedure TFrameOptionPageFormDesigner.LoadData; 101 | begin 102 | cbxActive.Checked := FFormDesigner.Active; 103 | cbxLabelMargin.Checked := FFormDesigner.LabelMargin; 104 | chkRemoveExplicitProperties.Checked := FFormDesigner.RemoveExplicitProperty; 105 | 106 | cbxActiveClick(cbxActive); 107 | end; 108 | 109 | procedure TFrameOptionPageFormDesigner.SaveData; 110 | begin 111 | FFormDesigner.LabelMargin := cbxLabelMargin.Checked; 112 | FFormDesigner.RemoveExplicitProperty := chkRemoveExplicitProperties.Checked; 113 | 114 | FFormDesigner.Active := cbxActive.Checked; 115 | FFormDesigner.Save; 116 | end; 117 | 118 | procedure TFrameOptionPageFormDesigner.Selected; 119 | begin 120 | end; 121 | 122 | procedure TFrameOptionPageFormDesigner.Unselected; 123 | begin 124 | end; 125 | 126 | { TFormDesigner } 127 | 128 | constructor TFormDesigner.Create; 129 | begin 130 | inherited Create(AppDataDirectory + '\FormDesigner.xml', 'FormDesigner'); 131 | end; 132 | 133 | destructor TFormDesigner.Destroy; 134 | begin 135 | Active := False; 136 | inherited Destroy; 137 | end; 138 | 139 | procedure TFormDesigner.Init; 140 | begin 141 | inherited Init; 142 | LabelMargin := True; 143 | RemoveExplicitProperty := False; 144 | Active := True; 145 | end; 146 | 147 | procedure TFormDesigner.SetActive(const Value: Boolean); 148 | begin 149 | if Value <> FActive then 150 | begin 151 | FActive := Value; 152 | UpdateHooks; 153 | end; 154 | end; 155 | 156 | procedure TFormDesigner.SetLabelMargin(const Value: Boolean); 157 | begin 158 | if Value <> FLabelMargin then 159 | begin 160 | FLabelMargin := Value; 161 | if Active then 162 | UpdateHooks; 163 | end; 164 | end; 165 | 166 | procedure TFormDesigner.SetRemoveExplicitProperty(const Value: Boolean); 167 | begin 168 | if Value <> FRemoveExplicitProperty then 169 | begin 170 | FRemoveExplicitProperty := Value; 171 | if Active then 172 | UpdateHooks; 173 | end; 174 | end; 175 | 176 | procedure TFormDesigner.UpdateHooks; 177 | begin 178 | {$IFDEF INCLUDE_FORMDESIGNER} 179 | SetLabelMarginActive(Active and LabelMargin); 180 | SetRemoveExplicitPropertyActive(Active and RemoveExplicitProperty); 181 | {$ENDIF INCLUDE_FORMDESIGNER} 182 | end; 183 | 184 | function TFormDesigner.GetOptionPages: TTreePage; 185 | begin 186 | Result := TTreePage.Create('Form Designer', TFrameOptionPageFormDesigner, Self); 187 | end; 188 | 189 | end. 190 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FormDesignerHelpers/GuideLinesHelper.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit GuideLinesHelper; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | {$IFNDEF COMPILER12_UP} 16 | {$IFDEF COMPILER10_UP} 17 | 18 | uses 19 | SysUtils, Classes, Forms, Controls, IDEHooks, Hooking; 20 | 21 | procedure SetGuildLinesHelperActive(Active: Boolean); 22 | 23 | {$ENDIF COMPILER10_UP} 24 | {$ENDIF ~COMPILER12_UP} 25 | 26 | implementation 27 | 28 | {$IFNDEF COMPILER12_UP} 29 | {$IFDEF COMPILER10_UP} 30 | 31 | uses 32 | Utils; 33 | 34 | var 35 | TDesigner_SnapToAlignGuide: TRedirectCode; 36 | TDesigner_SnapToMarginGuide: TRedirectCode; 37 | 38 | type 39 | TGuideType = set of (gtFirst = 0, gtLast = 5); 40 | 41 | function Hook_TDesigner_SnapToAlignGuide(Instance: TObject; var i: Integer; 42 | const ItemGuideLines: IInterface; List: TList; GuideType: TGuideType): Boolean; 43 | type 44 | TTDesigner_SnapToAlignGuide = function(Instance: TObject; var i: Integer; 45 | const ItemGuideLines: IInterface; List: TList; GuideType: TGuideType): Boolean; 46 | var 47 | Shift: TShiftState; 48 | begin 49 | Shift := KeyboardStateToShiftState; 50 | if (ssAlt in Shift) and ([ssLeft, ssMiddle] * Shift <> []) then 51 | Result := False 52 | else 53 | begin 54 | UnhookFunction(TDesigner_SnapToAlignGuide); 55 | try 56 | Result := TTDesigner_SnapToAlignGuide(TDesigner_SnapToAlignGuide.RealProc)(Instance, i, ItemGuideLines, List, GuideType); 57 | finally 58 | RehookFunction(@Hook_TDesigner_SnapToAlignGuide, TDesigner_SnapToAlignGuide); 59 | end; 60 | end; 61 | end; 62 | 63 | function Hook_TDesigner_SnapToMarginGuide(Instance: TObject; const ItemWrapper: IInterface; 64 | var i: Integer; const ItemGuideLines: IInterface; List: TList; GuideType: TGuideType): Boolean; 65 | type 66 | TTDesigner_SnapToMarginGuide = function(Instance: TObject; const ItemWrapper: IInterface; 67 | var i: Integer; const ItemGuideLines: IInterface; List: TList; GuideType: TGuideType): Boolean; 68 | var 69 | Shift: TShiftState; 70 | begin 71 | Shift := KeyboardStateToShiftState; 72 | if (ssAlt in Shift) and ([ssLeft, ssMiddle] * Shift <> []) then 73 | Result := False 74 | else 75 | begin 76 | UnhookFunction(TDesigner_SnapToMarginGuide); 77 | try 78 | Result := TTDesigner_SnapToMarginGuide(TDesigner_SnapToMarginGuide.RealProc)(Instance, ItemWrapper, i, ItemGuideLines, List, GuideType); 79 | finally 80 | RehookFunction(@Hook_TDesigner_SnapToMarginGuide, TDesigner_SnapToMarginGuide); 81 | end; 82 | end; 83 | end; 84 | 85 | var 86 | IsActive: Boolean; 87 | 88 | procedure SetGuildLinesHelperActive(Active: Boolean); 89 | begin 90 | if Active <> IsActive then 91 | begin 92 | IsActive := Active; 93 | if Active then 94 | begin 95 | HookFunction(designide_bpl, '@Designer@TDesigner@SnapToAlignGuide$qqrrix52System@%DelphiInterface$t24Designer@IItemGuidelines%p19Contnrs@TObjectList48System@%Set$t19Designer@TGuideType$iuc$0$iuc$12%', 96 | @Hook_TDesigner_SnapToAlignGuide, TDesigner_SnapToAlignGuide); 97 | HookFunction(designide_bpl, '@Designer@TDesigner@SnapToMarginGuide$qqrx49System@%DelphiInterface$t21Designer@IItemWrapper%rix52System@%DelphiInterface$t24Designer@IItemGuidelines%p19Contnrs@TObjectList48System@%Set$t19Designer@TGuideType$iuc$0$iuc$12%', 98 | @Hook_TDesigner_SnapToMarginGuide, TDesigner_SnapToMarginGuide); 99 | end 100 | else 101 | begin 102 | UnhookFunction(TDesigner_SnapToAlignGuide); 103 | UnhookFunction(TDesigner_SnapToMarginGuide); 104 | end; 105 | end; 106 | end; 107 | 108 | {$ENDIF COMPILER10_UP} 109 | {$ENDIF ~COMPILER12_UP} 110 | 111 | end. 112 | 113 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FormDesignerHelpers/LabelMarginHelper.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit LabelMarginHelper; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | {$IFDEF COMPILER10_UP} 16 | 17 | uses 18 | SysUtils, Classes, Forms, Controls, IDEHooks, Hooking, StdCtrls; 19 | 20 | procedure SetLabelMarginActive(Active: Boolean); 21 | 22 | {$ENDIF COMPILER10_UP} 23 | 24 | implementation 25 | 26 | {$IFDEF COMPILER10_UP} 27 | 28 | type 29 | TLabelMargins = class(TMargins) 30 | protected 31 | class procedure InitDefaults(Margins: TMargins); override; 32 | published 33 | property Bottom default 0; 34 | end; 35 | 36 | class procedure TLabelMargins.InitDefaults(Margins: TMargins); 37 | begin 38 | inherited InitDefaults(Margins); 39 | Margins.Bottom := 0; 40 | end; 41 | 42 | procedure Label_AfterConstruction(Self: TLabel); 43 | type 44 | TAfterConstructionProc = procedure(Self: TLabel); 45 | var 46 | P: ^TMargins; 47 | ChangeEvent: TNotifyEvent; 48 | begin 49 | if csDesigning in Self.ComponentState then 50 | begin 51 | P := @Self.Margins; 52 | ChangeEvent := Self.Margins.OnChange; 53 | P^.Free; 54 | P^ := TLabelMargins.Create(Self); 55 | P^.OnChange := ChangeEvent; 56 | end; 57 | TAfterConstructionProc(@TLabel.AfterConstruction)(Self); 58 | end; 59 | 60 | var 61 | IsActive: Boolean; 62 | 63 | procedure SetLabelMarginActive(Active: Boolean); 64 | begin 65 | if Active <> IsActive then 66 | begin 67 | IsActive := Active; 68 | if Active then 69 | ReplaceVmtField(TLabel, @TLabel.AfterConstruction, @Label_AfterConstruction) 70 | else 71 | ReplaceVmtField(TLabel, @Label_AfterConstruction, @TLabel.AfterConstruction); 72 | end; 73 | end; 74 | 75 | {$ENDIF COMPILER10_UP} 76 | 77 | end. 78 | 79 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FormDesignerHelpers/RemoveExplicitProperty.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2008 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit RemoveExplicitProperty; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | {$IFDEF COMPILER10_UP} 16 | 17 | uses 18 | SysUtils, Classes, Forms, Controls, IDEHooks, Hooking; 19 | 20 | procedure SetRemoveExplicitPropertyActive(Active: Boolean); 21 | 22 | {$ENDIF COMPILER10_UP} 23 | 24 | implementation 25 | 26 | {$IFDEF COMPILER10_UP} 27 | 28 | uses 29 | IDEUtils; 30 | 31 | var 32 | HookTControl_DefineProperties: TRedirectCode; 33 | 34 | type 35 | TControlEx = class(TControl) 36 | protected 37 | procedure ReadIsControl(Reader: TReader); 38 | procedure WriteIsControl(Writer: TWriter); 39 | 40 | procedure WriteExplicitLeft(Writer: TWriter); 41 | procedure WriteExplicitTop(Writer: TWriter); 42 | procedure WriteExplicitWidth(Writer: TWriter); 43 | procedure WriteExplicitHeight(Writer: TWriter); 44 | 45 | procedure ReadExplicitLeft(Reader: TReader); 46 | procedure ReadExplicitTop(Reader: TReader); 47 | procedure ReadExplicitWidth(Reader: TReader); 48 | procedure ReadExplicitHeight(Reader: TReader); 49 | 50 | procedure IgnoreInteger(Reader: TReader); 51 | 52 | procedure DefineProperties(Filer: TFiler); override; 53 | end; 54 | 55 | TOpenControl = class(TControl); 56 | 57 | procedure TControlEx.ReadIsControl(Reader: TReader); 58 | begin 59 | IsControl := Reader.ReadBoolean; 60 | end; 61 | 62 | procedure TControlEx.WriteIsControl(Writer: TWriter); 63 | begin 64 | Writer.WriteBoolean(IsControl); 65 | end; 66 | 67 | procedure TControlEx.WriteExplicitTop(Writer: TWriter); 68 | begin 69 | Writer.WriteInteger(FExplicitTop); 70 | end; 71 | 72 | procedure TControlEx.WriteExplicitHeight(Writer: TWriter); 73 | begin 74 | Writer.WriteInteger(FExplicitHeight); 75 | end; 76 | 77 | procedure TControlEx.WriteExplicitLeft(Writer: TWriter); 78 | begin 79 | Writer.WriteInteger(FExplicitLeft); 80 | end; 81 | 82 | procedure TControlEx.ReadExplicitWidth(Reader: TReader); 83 | begin 84 | FExplicitWidth := Reader.ReadInteger; 85 | end; 86 | 87 | procedure TControlEx.WriteExplicitWidth(Writer: TWriter); 88 | begin 89 | Writer.WriteInteger(FExplicitWidth); 90 | end; 91 | 92 | procedure TControlEx.ReadExplicitTop(Reader: TReader); 93 | begin 94 | FExplicitTop := Reader.ReadInteger; 95 | end; 96 | 97 | procedure TControlEx.ReadExplicitHeight(Reader: TReader); 98 | begin 99 | FExplicitHeight := Reader.ReadInteger; 100 | end; 101 | 102 | procedure TControlEx.ReadExplicitLeft(Reader: TReader); 103 | begin 104 | FExplicitLeft := Reader.ReadInteger; 105 | end; 106 | 107 | procedure TControlEx.IgnoreInteger(Reader: TReader); 108 | begin 109 | Reader.ReadInteger; 110 | end; 111 | 112 | procedure TControlEx.DefineProperties(Filer: TFiler); 113 | type 114 | TExplicitDimension = (edLeft, edTop, edWidth, edHeight); 115 | 116 | function DoWriteIsControl: Boolean; 117 | begin 118 | if Filer.Ancestor <> nil then 119 | Result := TControlEx(Filer.Ancestor).IsControl <> IsControl else 120 | Result := IsControl; 121 | end; 122 | 123 | function DoWriteExplicit(Dim: TExplicitDimension): Boolean; 124 | begin 125 | case Dim of 126 | edLeft: Result := ((Filer.Ancestor <> nil) and (TControl(Filer.Ancestor).ExplicitLeft <> FExplicitLeft)) or 127 | ((Filer.Ancestor = nil) and ((Align <> alNone) or ((Anchors * [akLeft]) = [])) and (FExplicitLeft <> Left)); 128 | edTop: Result := ((Filer.Ancestor <> nil) and (TControl(Filer.Ancestor).ExplicitTop <> FExplicitTop)) or 129 | ((Filer.Ancestor = nil) and ((Align <> alNone) or ((Anchors * [akTop]) = [])) and (FExplicitTop <> Top)); 130 | edWidth: Result := ((Filer.Ancestor <> nil) and (TControl(Filer.Ancestor).ExplicitWidth <> FExplicitWidth)) or 131 | ((Filer.Ancestor = nil) and ((Align <> alNone) or ((Anchors * [akLeft, akRight]) = [akLeft, akRight])) and (FExplicitWidth <> Width)); 132 | edHeight: Result := ((Filer.Ancestor <> nil) and (TControl(Filer.Ancestor).ExplicitHeight <> FExplicitHeight)) or 133 | ((Filer.Ancestor = nil) and ((Align <> alNone) or ((Anchors * [akTop, akBottom]) = [akTop, akBottom])) and (FExplicitHeight <> Height)); 134 | else 135 | Result := False; 136 | end; 137 | end; 138 | 139 | begin 140 | { The call to inherited DefinedProperties is omitted since the Left and 141 | Top special properties are redefined with real properties } 142 | Filer.DefineProperty('IsControl', ReadIsControl, WriteIsControl, DoWriteIsControl); 143 | 144 | if csDesigning in ComponentState then 145 | begin 146 | Filer.DefineProperty('ExplicitLeft', IgnoreInteger, nil, False); 147 | Filer.DefineProperty('ExplicitTop', IgnoreInteger, nil, False); 148 | Filer.DefineProperty('ExplicitWidth', IgnoreInteger, nil, False); 149 | Filer.DefineProperty('ExplicitHeight', IgnoreInteger, nil, False); 150 | end 151 | else 152 | begin 153 | Filer.DefineProperty('ExplicitLeft', ReadExplicitLeft, WriteExplicitLeft, not (csReading in ComponentState) and DoWriteExplicit(edLeft)); 154 | Filer.DefineProperty('ExplicitTop', ReadExplicitTop, WriteExplicitTop, not (csReading in ComponentState) and DoWriteExplicit(edTop)); 155 | Filer.DefineProperty('ExplicitWidth', ReadExplicitWidth, WriteExplicitWidth, not (csReading in ComponentState) and DoWriteExplicit(edWidth)); 156 | Filer.DefineProperty('ExplicitHeight', ReadExplicitHeight, WriteExplicitHeight, not (csReading in ComponentState) and DoWriteExplicit(edHeight)); 157 | end; 158 | end; 159 | 160 | 161 | var 162 | IsActive: Boolean; 163 | 164 | procedure SetRemoveExplicitPropertyActive(Active: Boolean); 165 | begin 166 | if Active <> IsActive then 167 | begin 168 | IsActive := Active; 169 | if Active then 170 | CodeRedirect(@TOpenControl.DefineProperties, @TControlEx.DefineProperties, HookTControl_DefineProperties) 171 | else 172 | UnhookFunction(HookTControl_DefineProperties); 173 | end; 174 | end; 175 | 176 | {$ENDIF COMPILER10_UP} 177 | 178 | end. 179 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FrmDDevExtOptions.dfm: -------------------------------------------------------------------------------- 1 | inherited FormDDevExtOptions: TFormDDevExtOptions 2 | Caption = 'DDevExtensions - Options' 3 | PixelsPerInch = 96 4 | TextHeight = 13 5 | inherited PanelButtons: TPanel 6 | inherited lblURL: TLabel 7 | Hint = 'mailto:Andreas.Hausladen@gmx.de?subject=DDevExtensions' 8 | Caption = '(C) 2006-2009 Andreas Hausladen' 9 | end 10 | inherited Label1: TLabel 11 | Hint = 'https://www.idefixpack.de/blog/?page_id=10' 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FrmDDevExtOptions.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2009 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmDDevExtOptions; 10 | 11 | interface 12 | 13 | uses 14 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 15 | Dialogs, FrmOptions, ExtCtrls, ComCtrls, StdCtrls; 16 | 17 | type 18 | TFormDDevExtOptions = class(TFormOptions) 19 | procedure FormCreate(Sender: TObject); 20 | private 21 | { Private-Deklarationen } 22 | public 23 | { Public-Deklarationen } 24 | end; 25 | 26 | implementation 27 | 28 | uses 29 | AppConsts; 30 | 31 | {$R *.dfm} 32 | 33 | procedure TFormDDevExtOptions.FormCreate(Sender: TObject); 34 | begin 35 | inherited; 36 | lblVersion.Caption := 'Version ' + sPluginVersion; 37 | lblURL.Caption := sPluginSmallCopyright; 38 | end; 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FrmeBase.dfm: -------------------------------------------------------------------------------- 1 | object FrameBase: TFrameBase 2 | Left = 0 3 | Top = 0 4 | Width = 320 5 | Height = 240 6 | TabOrder = 0 7 | object pnlClient: TPanel 8 | Left = 0 9 | Top = 49 10 | Width = 320 11 | Height = 191 12 | Align = alClient 13 | BevelOuter = bvNone 14 | TabOrder = 0 15 | end 16 | object pnlDescription: TPanel 17 | Left = 0 18 | Top = 0 19 | Width = 320 20 | Height = 49 21 | Align = alTop 22 | BevelOuter = bvNone 23 | Color = clWindow 24 | ParentBackground = False 25 | TabOrder = 1 26 | object bvlSplitter: TBevel 27 | Left = 0 28 | Top = 47 29 | Width = 320 30 | Height = 2 31 | Align = alBottom 32 | end 33 | object lblDescription: TLabel 34 | Left = 16 35 | Top = 24 36 | Width = 63 37 | Height = 13 38 | Caption = 'lblDescription' 39 | end 40 | object lblCaption: TLabel 41 | Left = 16 42 | Top = 8 43 | Width = 56 44 | Height = 13 45 | Caption = 'lblCaption' 46 | Font.Charset = DEFAULT_CHARSET 47 | Font.Color = clWindowText 48 | Font.Height = -11 49 | Font.Style = [fsBold] 50 | ParentFont = False 51 | end 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/FrmeBase.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2008 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmeBase; 10 | 11 | {$I DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 17 | Dialogs, ExtCtrls, StdCtrls, FrmTreePages; 18 | 19 | 20 | type 21 | TFrameBase = class(TFrame, ITreePageComponentEx) 22 | pnlClient: TPanel; 23 | pnlDescription: TPanel; 24 | bvlSplitter: TBevel; 25 | lblDescription: TLabel; 26 | lblCaption: TLabel; 27 | private 28 | { Private-Deklarationen } 29 | protected 30 | procedure SetTitle(const ACaption: string); 31 | public 32 | { Public-Deklarationen } 33 | constructor Create(AOwner: TComponent); override; 34 | end; 35 | 36 | implementation 37 | 38 | {$R *.dfm} 39 | 40 | type 41 | PPointer = ^Pointer; 42 | {$IF not declared(SIZE_T)} 43 | SIZE_T = DWORD; 44 | {$IFEND} 45 | 46 | function GetVirtualMethod(AClass: TClass; const Index: Integer): Pointer; 47 | begin 48 | Result := PPointer(PAnsiChar(AClass) + Index * SizeOf(Pointer))^; 49 | end; 50 | 51 | procedure SetVirtualMethod(AClass: TClass; const Index: Integer; const Method: Pointer); 52 | var 53 | WrittenBytes: SIZE_T; 54 | PatchAddress: PPointer; 55 | begin 56 | PatchAddress := Pointer(PAnsiChar(AClass) + Index * SizeOf(Pointer)); 57 | WriteProcessMemory(GetCurrentProcess, PatchAddress, @Method, SizeOf(Method), WrittenBytes); 58 | end; 59 | 60 | procedure ReaderError(Self: TObject; Reader: TReader; const Message: string; var Handled: Boolean); 61 | begin 62 | Handled := True; 63 | end; 64 | 65 | function IgnoreReader_NewInstance(AClass: TClass): TObject; 66 | var 67 | M: TMethod; 68 | begin 69 | M.Code := @ReaderError; 70 | M.Data := nil; 71 | Result := TReader.NewInstance; 72 | TReader(Result).OnError := TReaderError(M); 73 | end; 74 | 75 | { TFrameBase } 76 | 77 | constructor TFrameBase.Create(AOwner: TComponent); 78 | const 79 | {$WARNINGS OFF} 80 | Index = vmtNewInstance div SizeOf(Pointer); 81 | {$WARNINGS ON} 82 | var 83 | NewInst: procedure; 84 | begin 85 | NewInst := GetVirtualMethod(TReader, Index); 86 | try 87 | SetVirtualMethod(TReader, Index, @IgnoreReader_NewInstance); 88 | inherited Create(AOwner); 89 | finally 90 | SetVirtualMethod(TReader, Index, @NewInst); 91 | end; 92 | 93 | Align := alClient; 94 | {$IFDEF COMPILER7_UP} 95 | pnlDescription.Color := clBtnFace; 96 | pnlDescription.ParentBackground := True; 97 | {$ENDIF COMPILER7_UP} 98 | end; 99 | 100 | procedure TFrameBase.SetTitle(const ACaption: string); 101 | begin 102 | lblCaption.Caption := ACaption; 103 | end; 104 | 105 | end. 106 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Icon24x24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Icon24x24.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Icon32x32.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Icon32x32.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/DDevExtensionsLogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/DDevExtensionsLogo.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/DDevExtensionsLogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 32 | 34 | 38 | 42 | 43 | 54 | 55 | 72 | DDev 87 | Extensions 101 | 110 | 111 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/DDevExtensionsLogoBlack.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/DDevExtensionsLogoBlack.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/DDevExtensionsLogoWhite.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/DDevExtensionsLogoWhite.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/DropDown.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/DropDown.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/LeftArrow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/LeftArrow.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/Modified.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/Modified.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/imlFilter.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/imlFilter.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Images/imlIcons.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Images/imlIcons.bmp -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Keybindings/FrmeOptionPageKeybindings.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageKeybindings: TFrameOptionPageKeybindings 2 | Width = 317 3 | Height = 266 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 317 7 | Height = 217 8 | object cbxActive: TCheckBox 9 | Left = 8 10 | Top = 8 11 | Width = 57 12 | Height = 17 13 | Caption = '&Active' 14 | TabOrder = 0 15 | OnClick = cbxActiveClick 16 | end 17 | object cbxExtendedHome: TCheckBox 18 | Left = 24 19 | Top = 77 20 | Width = 161 21 | Height = 17 22 | Hint = 23 | 'Pressing the HOME key in the first column moves the '#13#10'caret to t' + 24 | 'he first non-whitespace char in the line.' 25 | Caption = 'Extended HOME' 26 | TabOrder = 3 27 | OnClick = cbxExtendedHomeClick 28 | end 29 | object cbxSwitchExtendedHome: TCheckBox 30 | Left = 40 31 | Top = 100 32 | Width = 225 33 | Height = 17 34 | Hint = 35 | 'Pressing the HOME key will position the caret at the first'#13#10'non-' + 36 | 'whitespace char in the line. Pressing the HOME key'#13#10'again will m' + 37 | 'ove it to the begin of the line.' 38 | Caption = 'First jump to first non-whitespace char' 39 | TabOrder = 4 40 | end 41 | object cbxTabIndent: TCheckBox 42 | Left = 24 43 | Top = 31 44 | Width = 161 45 | Height = 17 46 | Hint = 47 | 'Pressing TAB/Shift-TAB in a selected text block indents/unindent' + 48 | 's'#13#10'the block.' 49 | Caption = 'Indent text block with TAB' 50 | TabOrder = 1 51 | OnClick = cbxTabIndentClick 52 | end 53 | object cbxIndentSingleLine: TCheckBox 54 | Left = 40 55 | Top = 54 56 | Width = 225 57 | Height = 17 58 | Hint = 59 | 'Indent/Unindent a selected text block that doesn'#39't include a lin' + 60 | 'e break ' 61 | Caption = 'Allow single line indention' 62 | TabOrder = 2 63 | end 64 | object cbxExtendedCtrlLeftRight: TCheckBox 65 | Left = 24 66 | Top = 123 67 | Width = 161 68 | Height = 17 69 | Hint = 'Ctrl+Left/Right like in VisualStudio' 70 | Caption = 'Extended Ctrl+Left/Right' 71 | TabOrder = 5 72 | OnClick = cbxTabIndentClick 73 | end 74 | object cbxShiftF3: TCheckBox 75 | Left = 24 76 | Top = 192 77 | Width = 174 78 | Height = 17 79 | Hint = 80 | 'Adds support for the Shift-F3 shortcut to the code editor.'#13#10'It a' + 81 | 'llows to reverse the current text search.' 82 | Caption = 'Shift-F3 for reverse search' 83 | ParentShowHint = False 84 | ShowHint = True 85 | TabOrder = 8 86 | Visible = False 87 | end 88 | object chkMoveLineBlock: TCheckBox 89 | Left = 24 90 | Top = 146 91 | Width = 241 92 | Height = 17 93 | Hint = 'Alt+Up/Down move the current line or selected block up/down.' 94 | Caption = 'Shift+Ctrl+Alt+Up/Down move line/block' 95 | ParentShowHint = False 96 | ShowHint = True 97 | TabOrder = 6 98 | end 99 | object chkFindDeclOnCaret: TCheckBox 100 | Left = 24 101 | Top = 169 102 | Width = 241 103 | Height = 17 104 | Hint = 105 | 'Find the declaration of the word under the caret on Ctrl+Alt+PgU' + 106 | 'p' 107 | Caption = 'Find declaration on Ctrl+Alt+PgUp' 108 | ParentShowHint = False 109 | ShowHint = True 110 | TabOrder = 7 111 | end 112 | end 113 | inherited pnlDescription: TPanel 114 | Width = 317 115 | inherited bvlSplitter: TBevel 116 | Width = 317 117 | end 118 | inherited lblDescription: TLabel 119 | Width = 182 120 | Caption = 'Configure the enhanced key bindings.' 121 | end 122 | end 123 | end 124 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Main.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit Main; 10 | 11 | {$I DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, SysUtils, Classes, Hooking, IDEUtils, Splash, Registry, Forms, Menus, 17 | Graphics, Controls, ExtCtrls, ActnList, AppConsts, ToolsAPI, Dialogs, 18 | StdCtrls, ComCtrls, ActiveX, ShlObj, ImportHooking; 19 | 20 | type 21 | TLateLoaderProc = procedure(Unload: Boolean); 22 | 23 | procedure InstallHooks; 24 | procedure UninstallHooks; 25 | 26 | procedure ExpertLoaded; 27 | procedure IDELoaded; // called by Splash 28 | 29 | procedure RegisterExpertLoader(Proc: TLateLoaderProc); 30 | procedure RegisterLateLoader(Proc: TLateLoaderProc); 31 | procedure InitAppDataDirectory; // called by InstallHooks 32 | 33 | var 34 | APIHookList: TJclPeMapImgHooks; 35 | AppDataDirectory: string; 36 | 37 | implementation 38 | 39 | uses 40 | SysConst, IDEHooks, ComponentManager, DtmImages, FrmDDevExtOptions, RegisterPlugins, 41 | ToolsAPIHelpers, PluginConfig; 42 | 43 | var 44 | HookFinalizePackage: TRedirectCode; 45 | OrgFinalizePackage: Pointer; 46 | LateLoaderList: TList; 47 | ExpertLoaderList: TList; 48 | MenuItemOptions: TMenuItem; 49 | 50 | procedure RegisterExpertLoader(Proc: TLateLoaderProc); 51 | begin 52 | if not Assigned(ExpertLoaderList) then 53 | ExpertLoaderList := TList.Create; 54 | ExpertLoaderList.Add(@Proc); 55 | end; 56 | 57 | procedure RegisterLateLoader(Proc: TLateLoaderProc); 58 | begin 59 | if not Assigned(LateLoaderList) then 60 | LateLoaderList := TList.Create; 61 | LateLoaderList.Add(@Proc); 62 | end; 63 | 64 | procedure ShowOptionsDialog(Data: TObject; Sender: TObject); 65 | begin 66 | TFormDDevExtOptions.Execute; 67 | end; 68 | 69 | procedure HookedFinalizePackage(Module: HMODULE); 70 | type 71 | TPackageUnload = procedure; 72 | var 73 | PackageUnload: TPackageUnload; 74 | begin 75 | {.$IFNDEF COMPILER9_UP} 76 | if (Application <> nil) and not Application.Terminated then 77 | try 78 | RegisteredComponents.DeletePackageComponents(Module); 79 | except 80 | end; 81 | {.$ENDIF ~COMPILER9_UP} 82 | @PackageUnload := GetProcAddress(Module, 'Finalize'); //Do not localize 83 | if Assigned(PackageUnload) then 84 | PackageUnload 85 | else 86 | raise EPackageError.CreateRes(@sInvalidPackageHandle); 87 | end; 88 | 89 | procedure InitAppDataDirectory; 90 | var 91 | Malloc: IMalloc; 92 | pidl: PItemIDList; 93 | Buffer: string; 94 | begin 95 | AppDataDirectory := ExtractFileDir(ExtractFileDir((ParamStr(0)))); 96 | { Windows 95 compatible way, Win98 supports SHGetSpecialFolderPath() } 97 | SHGetMalloc(Malloc); 98 | if SHGetSpecialFolderLocation(Application.Handle, CSIDL_APPDATA, pidl) = S_OK then 99 | begin 100 | try 101 | SetLength(Buffer, MAX_PATH * 2); // SHGetPathFromIDList has no MaxLen parameter 102 | if SHGetPathFromIDList(pidl, PChar(Buffer)) then 103 | AppDataDirectory := ExcludeTrailingPathDelimiter(Copy(Buffer, 1, StrLen(PChar(Buffer)))); 104 | finally 105 | Malloc.Free(pidl); 106 | Malloc := nil; 107 | end; 108 | end; 109 | if AppDataDirectory = '' then 110 | AppDataDirectory := ExtractFileDir(ExtractFileDir((ParamStr(0)))); 111 | AppDataDirectory := AppDataDirectory + '\DDevExtensions'; 112 | ForceDirectories(AppDataDirectory); 113 | end; 114 | 115 | procedure InstallHooks; 116 | begin 117 | InitAppDataDirectory; 118 | DataModuleImages := TDataModuleImages.Create(nil); 119 | 120 | OrgFinalizePackage := @SysUtils.FinalizePackage; 121 | if Assigned(OrgFinalizePackage) then 122 | CodeRedirect(OrgFinalizePackage, @HookedFinalizePackage, HookFinalizePackage); 123 | 124 | Configuration.BeginUpdate; 125 | try 126 | InitComponentManager; 127 | RegisterIDEPlugins; 128 | ExpertLoaded; 129 | finally 130 | Configuration.EndUpdate; 131 | end; 132 | end; 133 | 134 | procedure ExpertLoaded; 135 | var 136 | I: Integer; 137 | begin 138 | Configuration.BeginUpdate; 139 | try 140 | if Assigned(ExpertLoaderList) then 141 | begin 142 | for I := 0 to ExpertLoaderList.Count - 1 do 143 | begin 144 | try 145 | TLateLoaderProc(ExpertLoaderList[I])(False); 146 | except 147 | Application.HandleException(Application); 148 | end; 149 | end; 150 | end; 151 | finally 152 | Configuration.EndUpdate; 153 | end; 154 | end; 155 | 156 | procedure IDELoaded; 157 | var 158 | I, Index: Integer; 159 | Item: TMenuItem; 160 | begin 161 | MenuItemOptions := TMenuItem.Create(nil); 162 | MenuItemOptions.OnClick := MakeNotifyEvent(nil, @ShowOptionsDialog); 163 | MenuItemOptions.Caption := sMenuItemDDevExtensionsOptions; 164 | Item := FindMenuItem('ToolsMenu'); 165 | if Item <> nil then 166 | begin 167 | Index := Item.IndexOf(FindMenuItem('ToolsDebuggerOptionsItem')); 168 | if Index = -1 then 169 | Index := Item.IndexOf(FindMenuItem('ToolsToolsItem')) - 1; 170 | if Index >= 0 then 171 | Item.Insert(Index + 1, MenuItemOptions) 172 | else 173 | Item.Insert(1, MenuItemOptions); 174 | end; 175 | 176 | Configuration.BeginUpdate; 177 | try 178 | if Assigned(LateLoaderList) then 179 | begin 180 | for I := 0 to LateLoaderList.Count - 1 do 181 | begin 182 | try 183 | TLateLoaderProc(LateLoaderList[I])(False); 184 | except 185 | Application.HandleException(Application); 186 | end; 187 | end; 188 | end; 189 | finally 190 | Configuration.EndUpdate; 191 | end; 192 | end; 193 | 194 | procedure UninstallHooks; 195 | var 196 | I: Integer; 197 | begin 198 | try 199 | if (LateLoaderList <> nil) or (ExpertLoaderList <> nil) then 200 | begin 201 | Configuration.BeginUpdate; 202 | try 203 | // LateLoader 204 | if LateLoaderList <> nil then 205 | begin 206 | for I := LateLoaderList.Count - 1 downto 0 do 207 | begin 208 | try 209 | TLateLoaderProc(LateLoaderList[I])(True); 210 | except 211 | Application.HandleException(Application); 212 | end; 213 | end; 214 | FreeAndNil(LateLoaderList); 215 | end; 216 | // ExpertLoader 217 | if ExpertLoaderList <> nil then 218 | begin 219 | for I := ExpertLoaderList.Count - 1 downto 0 do 220 | begin 221 | try 222 | TLateLoaderProc(ExpertLoaderList[I])(True); 223 | except 224 | Application.HandleException(Application); 225 | end; 226 | end; 227 | FreeAndNil(ExpertLoaderList); 228 | end; 229 | finally 230 | Configuration.EndUpdate; 231 | end; 232 | end; 233 | finally 234 | DoneSplash; 235 | 236 | if Assigned(OrgFinalizePackage) then 237 | CodeRestore(HookFinalizePackage); 238 | 239 | FiniComponentManager; 240 | 241 | FreeAndNil(DataModuleImages); 242 | end; 243 | end; 244 | 245 | end. 246 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/OldPalette/ComponentPanel.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/OldPalette/ComponentPanel.res -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/OldPalette/FrmeOptionPageOldPalette.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageOldPalette: TFrameOptionPageOldPalette 2 | Width = 540 3 | Height = 226 4 | TabStop = True 5 | ExplicitWidth = 540 6 | ExplicitHeight = 226 7 | inherited pnlClient: TPanel 8 | Width = 540 9 | Height = 177 10 | ExplicitWidth = 540 11 | ExplicitHeight = 177 12 | object lblStyleCaption: TLabel 13 | Left = 24 14 | Top = 127 15 | Width = 27 16 | Height = 14 17 | Caption = 'Style:' 18 | FocusControl = cbxStyle 19 | Font.Charset = DEFAULT_CHARSET 20 | Font.Color = clWindowText 21 | Font.Height = -11 22 | Font.Style = [] 23 | ParentFont = False 24 | end 25 | object cbxActive: TCheckBox 26 | Left = 8 27 | Top = 8 28 | Width = 97 29 | Height = 17 30 | Hint = 'Activates the Old Component Palette.' 31 | Caption = '&Active' 32 | ParentShowHint = False 33 | ShowHint = True 34 | TabOrder = 0 35 | OnClick = cbxActiveClick 36 | end 37 | object cbxMultiline: TCheckBox 38 | Left = 24 39 | Top = 31 40 | Width = 172 41 | Height = 17 42 | Caption = 'Multiline' 43 | TabOrder = 1 44 | end 45 | object cbxRaggedRight: TCheckBox 46 | Left = 24 47 | Top = 54 48 | Width = 172 49 | Height = 17 50 | Caption = 'Ragged Right' 51 | TabOrder = 2 52 | end 53 | object cbxStyle: TComboBox 54 | Left = 24 55 | Top = 143 56 | Width = 121 57 | Height = 21 58 | Style = csDropDownList 59 | TabOrder = 5 60 | Items.Strings = ( 61 | 'Tabs' 62 | 'Buttons' 63 | 'Flat Buttons') 64 | end 65 | object chkAlphaSortPopupMenu: TCheckBox 66 | Left = 24 67 | Top = 77 68 | Width = 172 69 | Height = 17 70 | Caption = 'AlphaSort palette popup menu' 71 | TabOrder = 3 72 | end 73 | object chkSmallFonts: TCheckBox 74 | Left = 24 75 | Top = 100 76 | Width = 172 77 | Height = 17 78 | Caption = 'Use "Small Fonts 7"' 79 | TabOrder = 4 80 | end 81 | end 82 | inherited pnlDescription: TPanel 83 | Width = 540 84 | ExplicitWidth = 540 85 | inherited bvlSplitter: TBevel 86 | Width = 540 87 | ExplicitWidth = 540 88 | end 89 | inherited lblDescription: TLabel 90 | Width = 180 91 | Caption = 'Configure the old component palette.' 92 | ExplicitWidth = 180 93 | end 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/OldPalette/OldPalette.dfm: -------------------------------------------------------------------------------- 1 | object FrameOldPalette: TFrameOldPalette 2 | Left = 0 3 | Top = 0 4 | Width = 451 5 | Height = 56 6 | Align = alTop 7 | AutoSize = True 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Style = [] 12 | ParentFont = False 13 | TabOrder = 0 14 | Visible = False 15 | object TabControl: TTabControl 16 | Left = 0 17 | Top = 0 18 | Width = 451 19 | Height = 56 20 | Align = alTop 21 | Font.Charset = DEFAULT_CHARSET 22 | Font.Color = clWindowText 23 | Font.Height = -11 24 | Font.Style = [] 25 | MultiLine = True 26 | ParentFont = False 27 | PopupMenu = PopupMenuPalette 28 | RaggedRight = True 29 | TabOrder = 0 30 | OnChange = TabControlChange 31 | OnResize = TabControlResize 32 | object PanelPalette: TPanel 33 | Left = 4 34 | Top = 6 35 | Width = 443 36 | Height = 29 37 | Align = alTop 38 | AutoSize = True 39 | BevelOuter = bvNone 40 | TabOrder = 0 41 | object PanelSpacer: TPanel 42 | Left = 0 43 | Top = 28 44 | Width = 443 45 | Height = 1 46 | Align = alTop 47 | BevelOuter = bvNone 48 | TabOrder = 0 49 | end 50 | object Palette: TJvComponentPanel 51 | Left = 0 52 | Top = 0 53 | Width = 443 54 | Height = 28 55 | Align = alTop 56 | OnClick = PaletteClick 57 | OnDblClick = PaletteDblClick 58 | OnPaintContent = PalettePaintContent 59 | PopupMenu = PopupMenuPalette 60 | end 61 | end 62 | end 63 | object PopupMenuPalette: TPopupMenu 64 | Left = 192 65 | Top = 24 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ProjectSettings/FrmProjectSettingsEditOptions.dfm: -------------------------------------------------------------------------------- 1 | inherited FormProjectSettingsEditOptions: TFormProjectSettingsEditOptions 2 | Left = 391 3 | Top = 151 4 | Width = 545 5 | Height = 664 6 | BorderIcons = [biSystemMenu] 7 | Caption = 'Options' 8 | Position = poScreenCenter 9 | OnCreate = FormCreate 10 | PixelsPerInch = 96 11 | TextHeight = 13 12 | object lblCaption: TLabel 13 | Left = 8 14 | Top = 5 15 | Width = 465 16 | Height = 17 17 | AutoSize = False 18 | Caption = 19 | 'Here you can specify which options should be applied if you assi' + 20 | 'gn the project settings.' 21 | Font.Charset = DEFAULT_CHARSET 22 | Font.Color = clWindowText 23 | Font.Height = -11 24 | Font.Style = [] 25 | ParentFont = False 26 | end 27 | object btnOk: TButton 28 | Left = 369 29 | Top = 582 30 | Width = 75 31 | Height = 25 32 | Caption = '&OK' 33 | Default = True 34 | ModalResult = 1 35 | TabOrder = 0 36 | end 37 | object btnCancel: TButton 38 | Left = 450 39 | Top = 582 40 | Width = 75 41 | Height = 25 42 | Cancel = True 43 | Caption = '&Cancel' 44 | ModalResult = 2 45 | TabOrder = 1 46 | end 47 | object clbOptions: TCheckListBox 48 | Left = 8 49 | Top = 24 50 | Width = 516 51 | Height = 553 52 | Columns = 3 53 | ItemHeight = 13 54 | TabOrder = 2 55 | end 56 | object btnCheckAll: TButton 57 | Left = 8 58 | Top = 582 59 | Width = 73 60 | Height = 25 61 | Caption = 'Check all' 62 | TabOrder = 3 63 | OnClick = btnCheckAllClick 64 | end 65 | object btnUncheckAll: TButton 66 | Left = 88 67 | Top = 582 68 | Width = 73 69 | Height = 25 70 | Caption = 'Uncheck all' 71 | TabOrder = 4 72 | OnClick = btnCheckAllClick 73 | end 74 | object btnDefault: TButton 75 | Left = 256 76 | Top = 582 77 | Width = 75 78 | Height = 25 79 | Caption = 'Default' 80 | TabOrder = 6 81 | OnClick = btnDefaultClick 82 | end 83 | object btnToggle: TButton 84 | Left = 168 85 | Top = 582 86 | Width = 73 87 | Height = 25 88 | Caption = 'Toggle' 89 | TabOrder = 5 90 | OnClick = btnToggleClick 91 | end 92 | end 93 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/ProjectSettings/FrmProjectSettingsEditOptions.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2007 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit FrmProjectSettingsEditOptions; 10 | 11 | {$I ..\DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | {$IFDEF COMPILER6_UP} 17 | Variants, 18 | {$ENDIF COMPILER6_UP} 19 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 20 | Dialogs, Grids, ProjectSettingsData, StdCtrls, CheckLst, FrmBase; 21 | 22 | type 23 | TFormProjectSettingsEditOptions = class(TFormBase) 24 | btnOk: TButton; 25 | btnCancel: TButton; 26 | clbOptions: TCheckListBox; 27 | lblCaption: TLabel; 28 | btnCheckAll: TButton; 29 | btnUncheckAll: TButton; 30 | btnDefault: TButton; 31 | btnToggle: TButton; 32 | procedure FormCreate(Sender: TObject); 33 | procedure btnCheckAllClick(Sender: TObject); 34 | procedure btnDefaultClick(Sender: TObject); 35 | procedure btnToggleClick(Sender: TObject); 36 | private 37 | { Private-Deklarationen } 38 | FOrgListBoxWndProc: TWndMethod; 39 | function DoExecute(ASettings: TProjectSetting): Boolean; 40 | procedure ListBoxWndProc(var Msg: TMessage); 41 | public 42 | { Public-Deklarationen } 43 | class function Execute(ASettings: TProjectSetting): Boolean; 44 | end; 45 | 46 | {var 47 | FormProjectSettingsEditOptions: TFormProjectSettingsEditOptions;} 48 | 49 | implementation 50 | 51 | {$R *.dfm} 52 | 53 | { TFormProjectSettingsEditOptions } 54 | 55 | class function TFormProjectSettingsEditOptions.Execute(ASettings: TProjectSetting): Boolean; 56 | begin 57 | if ASettings <> nil then 58 | begin 59 | with Self.Create(nil) do 60 | try 61 | Result := DoExecute(ASettings); 62 | finally 63 | Free; 64 | end; 65 | end 66 | else 67 | Result := False; 68 | end; 69 | 70 | function TFormProjectSettingsEditOptions.DoExecute(ASettings: TProjectSetting): Boolean; 71 | var 72 | i, Index: Integer; 73 | begin 74 | for i := 0 to ASettings.Count - 1 do 75 | begin 76 | Index := clbOptions.Items.Add(ASettings.Items[i].Name); 77 | clbOptions.Checked[Index] := ASettings.Items[i].Active; 78 | end; 79 | Caption := ASettings.Name + ' - Option'; 80 | Result := ShowModal = mrOk; 81 | if Result then 82 | begin 83 | for i := 0 to clbOptions.Items.Count - 1 do 84 | begin 85 | Index := ASettings.IndexOf(clbOptions.Items[i]); 86 | if Index <> -1 then 87 | ASettings.Items[Index].Active := clbOptions.Checked[Index]; 88 | end; 89 | end; 90 | end; 91 | 92 | procedure TFormProjectSettingsEditOptions.FormCreate(Sender: TObject); 93 | begin 94 | FOrgListBoxWndProc := clbOptions.WindowProc; 95 | clbOptions.WindowProc := ListBoxWndProc; 96 | 97 | clbOptions.Anchors := [akLeft, akTop, akRight, akBottom]; 98 | btnOk.Anchors := [akRight, akBottom]; 99 | btnCancel.Anchors := [akRight, akBottom]; 100 | btnCheckAll.Anchors := [akLeft, akBottom]; 101 | btnUncheckAll.Anchors := [akLeft, akBottom]; 102 | btnDefault.Anchors := [akLeft, akBottom]; 103 | btnToggle.Anchors := [akLeft, akBottom]; 104 | end; 105 | 106 | procedure TFormProjectSettingsEditOptions.ListBoxWndProc(var Msg: TMessage); 107 | begin 108 | if Msg.Msg = CN_DRAWITEM then 109 | begin 110 | { fix bug } 111 | with clbOptions do 112 | if (Items.Count = 0) or (TWMDrawItem(Msg).DrawItemStruct^.itemID >= UINT(Items.Count)) then 113 | Exit; 114 | end; 115 | 116 | if Assigned(FOrgListBoxWndProc) then 117 | FOrgListBoxWndProc(Msg); 118 | end; 119 | 120 | procedure TFormProjectSettingsEditOptions.btnCheckAllClick(Sender: TObject); 121 | var 122 | i: Integer; 123 | begin 124 | for i := 0 to clbOptions.Items.Count - 1 do 125 | clbOptions.Checked[i] := Sender = btnCheckAll; 126 | end; 127 | 128 | procedure TFormProjectSettingsEditOptions.btnDefaultClick(Sender: TObject); 129 | var 130 | i, Index: Integer; 131 | List: TStrings; 132 | begin 133 | List := TStringList.Create; 134 | try 135 | TProjectSettingList.FillOptionNames(List); 136 | for i := 0 to clbOptions.Items.Count - 1 do 137 | begin 138 | Index := List.IndexOf(clbOptions.Items[i]); 139 | clbOptions.Checked[i] := (Index = -1) or (List.Objects[Index] = nil); 140 | end; 141 | finally 142 | List.Free; 143 | end; 144 | end; 145 | 146 | procedure TFormProjectSettingsEditOptions.btnToggleClick(Sender: TObject); 147 | var 148 | i: Integer; 149 | begin 150 | for i := 0 to clbOptions.Items.Count - 1 do 151 | clbOptions.Checked[i] := not clbOptions.Checked[i]; 152 | end; 153 | 154 | end. 155 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/RegisterPlugins.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2011 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit RegisterPlugins; 10 | 11 | {$I DelphiExtension.inc} 12 | 13 | interface 14 | 15 | procedure RegisterIDEPlugins; 16 | 17 | implementation 18 | 19 | uses 20 | SysUtils, Classes, Main, 21 | {$IF CompilerVersion < 21.0} // Delphi 2009 22 | ProjectMgrShortCuts, 23 | {$IFEND} 24 | FrmeOptionPageFormDesigner, 25 | FrmProjectSettingsSetVersioninfo, FocusEditor, CompileProgress, 26 | IDEMenuHandler, FrmeOptionPageKeybindings, 27 | FrmeOptionPageFileCleaner, FrmeOptionPageCompileBackup, 28 | {$IFDEF INCLUDE_STARTPARAMETERTEAM} 29 | FrmeOptionPageStartParameterTeam, // XE2 made the parameter configuration-aware 30 | {$ENDIF INCLUDE_STARTPARAMETERTEAM} 31 | FrmeOptionPageUnitSelector, FrmeOptionPageDSUFeatures, ComponentSelector, StrucViewSearch, 32 | {$IF CompilerVersion <= 32.0} // 10.2 Tokyo- 33 | FrmeOptionPageOldPalette, 34 | {$IFEND} 35 | StartParameterManagerReg, FrmReloadFiles{, PrjDesktopState}, 36 | CodeInsightHandling; 37 | 38 | procedure RegisterIDEPlugins; 39 | var 40 | DisabledPlugins: TStringList; 41 | I: Integer; 42 | begin 43 | DisabledPlugins := TStringList.Create; 44 | DisabledPlugins.Delimiter := ';'; 45 | DisabledPlugins.DelimitedText := GetEnvironmentVariable('DDevExtensions.DisabledFeatures'); 46 | for I := 0 to DisabledPlugins.Count - 1 do 47 | DisabledPlugins[I] := Trim(DisabledPlugins[I]); 48 | DisabledPlugins.Sorted := True; 49 | try 50 | if DisabledPlugins.IndexOf('DSUFeatures') = -1 then 51 | RegisterLateLoader(FrmeOptionPageDSUFeatures.InitPlugin); 52 | 53 | {$IFDEF INCLUDE_FOCUSEDITOR} 54 | if DisabledPlugins.IndexOf('FocusEditor') = -1 then 55 | RegisterLateLoader(FocusEditor.InitPlugin); // Set focus to editor after debugging 56 | {$ENDIF} 57 | 58 | // if DisabledPlugins.IndexOf('ProjectDesktopState') = -1 then 59 | // RegisterLateLoader(PrjDesktopState.InitPlugin); 60 | 61 | {$IFDEF INCLUDE_IDEMENUHANDLER} 62 | if DisabledPlugins.IndexOf('IDEMenuHandler') = -1 then 63 | RegisterLateLoader(IDEMenuHandler.InitPlugin); 64 | {$ENDIF} 65 | 66 | {$IFDEF INCLUDE_FORMDESIGNER} 67 | if DisabledPlugins.IndexOf('FormDesigner') = -1 then 68 | RegisterLateLoader(FrmeOptionPageFormDesigner.InitPlugin); 69 | {$ENDIF} 70 | 71 | {$IFDEF INCLUDE_COMPONENTSELECTOR} 72 | if DisabledPlugins.IndexOf('ComponentSelector') = -1 then 73 | RegisterLateLoader(ComponentSelector.InitPlugin); 74 | {$ENDIF} 75 | 76 | {------------------------------------------------------------------------------} 77 | 78 | if DisabledPlugins.IndexOf('ProjectSettingsSetVersioninfo') = -1 then 79 | RegisterLateLoader(FrmProjectSettingsSetVersioninfo.InitPlugin); 80 | 81 | {$IFDEF INCLUDE_COMPILEPROGRESS} 82 | if DisabledPlugins.IndexOf('CompileProgress') = -1 then 83 | RegisterLateLoader(CompileProgress.InitPlugin); 84 | {$ENDIF} 85 | 86 | {$IFDEF INCLUDE_UNITSELECTOR} 87 | if DisabledPlugins.IndexOf('UnitSelector') = -1 then 88 | RegisterLateLoader(FrmeOptionPageUnitSelector.InitPlugin); 89 | {$ENDIF} 90 | 91 | {$IFDEF INCLUDE_FILECLEANER} 92 | if DisabledPlugins.IndexOf('FileCleaner') = -1 then 93 | RegisterLateLoader(FrmeOptionPageFileCleaner.InitPlugin); 94 | {$ENDIF} 95 | 96 | {$IFDEF INCLUDE_COMPILEBACKUP} 97 | if DisabledPlugins.IndexOf('CompileBackup') = -1 then 98 | RegisterLateLoader(FrmeOptionPageCompileBackup.InitPlugin); 99 | {$ENDIF} 100 | 101 | {$IF CompilerVersion <= 32.0} // 10.2 Tokyo- 102 | {$IFDEF INCLUDE_OLDPALETTE} 103 | if DisabledPlugins.IndexOf('OldPalette') = -1 then 104 | RegisterLateLoader(FrmeOptionPageOldPalette.InitPlugin); 105 | {$ENDIF} 106 | {$IFEND} 107 | 108 | {$IFDEF INCLUDE_KEYBINDINGS} 109 | if DisabledPlugins.IndexOf('Keybindings') = -1 then 110 | RegisterLateLoader(FrmeOptionPageKeybindings.InitPlugin); 111 | {$ENDIF} 112 | 113 | {$IFDEF INCLUDE_EDITOR} 114 | if DisabledPlugins.IndexOf('Editor') = -1 then 115 | RegisterLateLoader(FrmeOptionPageEditor.InitPlugin); // Delphi 2006+ 116 | {$ENDIF} 117 | 118 | {$IFDEF INCLUDE_STARTPARAMETERTEAM} 119 | if DisabledPlugins.IndexOf('StartParameterTeam') = -1 then 120 | RegisterLateLoader(FrmeOptionPageStartParameterTeam.InitPlugin); 121 | {$ENDIF} 122 | 123 | {$IFDEF INCLUDE_STRUCVIEWSEARCH} 124 | if DisabledPlugins.IndexOf('StrucViewSearch') = -1 then 125 | RegisterLateLoader(StrucViewSearch.InitPlugin); 126 | {$ENDIF} 127 | 128 | {$IF CompilerVersion < 21.0} 129 | if DisabledPlugins.IndexOf('ProjectMgrShortCuts') = -1 then 130 | RegisterLateLoader(ProjectMgrShortCuts.InitPlugin); 131 | {$IFEND} 132 | 133 | if DisabledPlugins.IndexOf('StartParameter') = -1 then 134 | RegisterExpertLoader(StartParameterManagerReg.InitPlugin); 135 | 136 | if DisabledPlugins.IndexOf('ReloadFiles') = -1 then 137 | RegisterExpertLoader(FrmReloadFiles.InitPlugin); 138 | 139 | if DisabledPlugins.IndexOf('CodeInsightHandling') = -1 then 140 | RegisterLateLoader(CodeInsightHandling.InitPlugin); 141 | 142 | finally 143 | DisabledPlugins.Free; 144 | end; 145 | end; 146 | 147 | end. 148 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Splash.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2005-2013 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit Splash; 10 | 11 | {$I DelphiExtension.inc} 12 | 13 | interface 14 | 15 | uses 16 | Windows, SysUtils, Classes, Controls, Forms, Graphics, StdCtrls, 17 | ToolsAPI, 18 | ExtCtrls, AppConsts; 19 | 20 | procedure ShowOnSplashScreen; 21 | procedure SetSplashProgress(const Text: string); 22 | procedure DoneSplash; 23 | 24 | implementation 25 | 26 | uses 27 | Main; 28 | 29 | {$R Splash.res} 30 | 31 | var 32 | LblProgress: TLabel; 33 | 34 | type 35 | TSplashScreen = class(TComponent) 36 | public 37 | destructor Destroy; override; 38 | end; 39 | 40 | destructor TSplashScreen.Destroy; 41 | begin 42 | LblProgress := nil; 43 | IDELoaded; 44 | if Supports(BorlandIDEServices, IOTAAboutBoxServices) then 45 | (BorlandIDEServices as IOTAAboutBoxServices).AddPluginInfo(sPluginName, 'DDevExtensions - Extensions for the IDE' + 46 | sLineBreak + sLineBreak + sPluginSmallCopyright, 0); 47 | inherited Destroy; 48 | end; 49 | 50 | procedure SetSplashProgress(const Text: string); 51 | begin 52 | if Assigned(LblProgress) then 53 | LblProgress.Caption := Text; 54 | end; 55 | 56 | var 57 | InitTimerId: Integer = -1; 58 | 59 | procedure IsIDELoaded(wnd: HWND; Msg: Cardinal; idEvent: Cardinal; time: LongWord); stdcall; 60 | begin 61 | if (Application = nil) or Application.Terminated then 62 | begin 63 | KillTimer(0, InitTimerId); 64 | InitTimerId := -1; 65 | end 66 | else 67 | if (Application.MainForm <> nil) and Application.MainForm.Visible then 68 | begin 69 | KillTimer(0, InitTimerId); 70 | InitTimerId := -1; 71 | IDELoaded; 72 | end; 73 | end; 74 | 75 | procedure ShowOnSplashScreen; 76 | var 77 | SplashScreenInit: Boolean; 78 | begin 79 | SplashScreenInit := False; 80 | if BorlandIDEServices <> nil then 81 | begin 82 | SplashScreenServices.StatusMessage(sPluginName); 83 | SplashScreenServices.AddPluginBitmap(sPluginName, LoadBitmap(Hinstance, 'DDEVEXTENSIONSLOGO')); 84 | end; 85 | 86 | if InitTimerId <> -1 then 87 | KillTimer(0, InitTimerId); 88 | InitTimerId := -1; 89 | if not SplashScreenInit then 90 | InitTimerId := SetTimer(0, 0, 100, @IsIDELoaded); 91 | end; 92 | 93 | procedure DoneSplash; 94 | begin 95 | if InitTimerId <> -1 then 96 | KillTimer(0, InitTimerId); 97 | end; 98 | 99 | end. 100 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/Splash.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Source/Splash.res -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/StartParameterTeam/FrmeOptionPageStartParameterTeam.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageStartParameterTeam: TFrameOptionPageStartParameterTeam 2 | Width = 385 3 | Height = 200 4 | TabStop = True 5 | inherited pnlClient: TPanel 6 | Width = 385 7 | Height = 151 8 | object cbxActive: TCheckBox 9 | Left = 8 10 | Top = 8 11 | Width = 113 12 | Height = 17 13 | Caption = '&Active' 14 | TabOrder = 0 15 | end 16 | end 17 | inherited pnlDescription: TPanel 18 | Width = 385 19 | inherited bvlSplitter: TBevel 20 | Width = 385 21 | end 22 | inherited lblDescription: TLabel 23 | Width = 276 24 | Caption = 'The start parameters aren'#39't stored in the dproj/cbproj file' 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/UnitSelector/FrmeOptionPageUnitSelector.dfm: -------------------------------------------------------------------------------- 1 | inherited FrameOptionPageUnitSelector: TFrameOptionPageUnitSelector 2 | Height = 187 3 | TabStop = True 4 | inherited pnlClient: TPanel 5 | Height = 138 6 | TabOrder = 1 7 | object lblFindUseUnitHotKey: TLabel 8 | Left = 8 9 | Top = 31 10 | Width = 82 11 | Height = 13 12 | Caption = '&Find Unit hotkey:' 13 | FocusControl = hkFindUseUnit 14 | end 15 | object cbxUseUnitSelector: TCheckBox 16 | Left = 8 17 | Top = 75 18 | Width = 153 19 | Height = 17 20 | Caption = '&Use Unit Selector' 21 | TabOrder = 2 22 | end 23 | object hkFindUseUnit: THotKey 24 | Left = 8 25 | Top = 50 26 | Width = 161 27 | Height = 19 28 | HotKey = 0 29 | Modifiers = [] 30 | TabOrder = 0 31 | end 32 | object chkReplaceUseUnit: TCheckBox 33 | Left = 8 34 | Top = 8 35 | Width = 249 36 | Height = 17 37 | Caption = 'Replace "Use Unit..." by Find/Use Unit dialog' 38 | TabOrder = 1 39 | end 40 | end 41 | inherited pnlDescription: TPanel 42 | TabOrder = 0 43 | inherited lblDescription: TLabel 44 | Width = 253 45 | Caption = 'Configure the Unit Selector and Find/Use Unit dialog.' 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Source/version.inc: -------------------------------------------------------------------------------- 1 | VersionNumber = '2.90'; 2 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Version.rc: -------------------------------------------------------------------------------- 1 | #include "version.h" 2 | 3 | #define VER_FILEVERSION VER_PRODUCTVERSION 4 | #define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR 5 | 6 | #define VS_VERSION_INFO 1 7 | #define VS_FFI_FILEFLAGSMASK 63 8 | #define VS_FF_PRERELEASE 2 9 | #define VOS__WINDOWS32 4 10 | #define VFT_APP 1 11 | #define VFT_DLL 2 12 | #define VFT2_UNKNOWN 0 13 | 14 | 15 | #define VER_PRIVATEBUILD 0 16 | 17 | #ifndef RELEASE 18 | #define VER_PRERELEASE VS_FF_PRERELEASE 19 | #else 20 | #define VER_PRERELEASE 0 21 | #endif 22 | 23 | #ifndef DEBUG 24 | #define VER_DEBUG 0 25 | #else 26 | #define VER_DEBUG VS_FF_DEBUG 27 | #endif 28 | 29 | 30 | VS_VERSION_INFO VERSIONINFO 31 | FILEVERSION VER_FILEVERSION 32 | PRODUCTVERSION VER_PRODUCTVERSION 33 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 34 | FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG) 35 | FILEOS VOS__WINDOWS32 36 | FILETYPE VFT_DLL 37 | FILESUBTYPE VFT2_UNKNOWN 38 | BEGIN 39 | BLOCK "StringFileInfo" 40 | BEGIN 41 | BLOCK "040904E4" 42 | BEGIN 43 | VALUE "CompanyName", "Andreas Hausladen" 44 | VALUE "FileDescription", "DDevExtensions" 45 | VALUE "FileVersion", VER_FILEVERSION_STR 46 | VALUE "InternalName", "DDevExtensions" 47 | VALUE "LegalCopyright", "(C) 2006-2020 Andreas Hausladen" 48 | VALUE "LegalTrademarks1", "" 49 | VALUE "LegalTrademarks2", "" 50 | VALUE "OriginalFilename", "" 51 | VALUE "ProductName", "DDevExtensions" 52 | VALUE "ProductVersion", VER_PRODUCTVERSION_STR 53 | END 54 | END 55 | 56 | BLOCK "VarFileInfo" 57 | BEGIN 58 | /* The following line should only be modified for localized versions. */ 59 | /* It consists of any number of WORD,WORD pairs, with each pair */ 60 | /* describing a language,codepage combination supported by the file. */ 61 | /* */ 62 | /* For example, a file might have values "0x409,1252" indicating that it */ 63 | /* supports English language (0x409) in the Windows ANSI codepage (1252). */ 64 | 65 | VALUE "Translation", 0x409, 1252 66 | 67 | END 68 | END 69 | -------------------------------------------------------------------------------- /Code/DDevExtensions/Version.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Code/DDevExtensions/Version.res -------------------------------------------------------------------------------- /Code/DDevExtensions/clean.bat: -------------------------------------------------------------------------------- 1 | @build.bat clean 2 | -------------------------------------------------------------------------------- /Code/DDevExtensions/version.bat: -------------------------------------------------------------------------------- 1 | @SET majorversion=2 2 | @SET minorversion=88 3 | -------------------------------------------------------------------------------- /CompileInterceptor/Bin/CompileInterceptor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/CompileInterceptor/Bin/CompileInterceptor.dll -------------------------------------------------------------------------------- /CompileInterceptor/Bin/CompileInterceptorW.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/CompileInterceptor/Bin/CompileInterceptorW.dll -------------------------------------------------------------------------------- /CompileInterceptor/Example/ExampleCompileInterceptor.cfg: -------------------------------------------------------------------------------- 1 | -$A8 2 | -$B- 3 | -$C+ 4 | -$D+ 5 | -$E- 6 | -$F- 7 | -$G+ 8 | -$H+ 9 | -$I+ 10 | -$J- 11 | -$K- 12 | -$L+ 13 | -$M- 14 | -$N+ 15 | -$O+ 16 | -$P+ 17 | -$Q- 18 | -$R- 19 | -$S- 20 | -$T- 21 | -$U- 22 | -$V+ 23 | -$W- 24 | -$X+ 25 | -$YD 26 | -$Z1 27 | -cg 28 | -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 29 | -H+ 30 | -W+ 31 | -M 32 | -$M16384,1048576 33 | -K$00400000 34 | -LE"c:\borland\delphi7\Projects\Bpl" 35 | -LN"c:\borland\delphi7\Projects\Bpl" 36 | -w-UNSAFE_TYPE 37 | -w-UNSAFE_CODE 38 | -w-UNSAFE_CAST 39 | -------------------------------------------------------------------------------- /CompileInterceptor/Example/ExampleCompileInterceptor.dof: -------------------------------------------------------------------------------- 1 | [FileVersion] 2 | Version=7.0 3 | [Compiler] 4 | A=8 5 | B=0 6 | C=1 7 | D=1 8 | E=0 9 | F=0 10 | G=1 11 | H=1 12 | I=1 13 | J=0 14 | K=0 15 | L=1 16 | M=0 17 | N=1 18 | O=1 19 | P=1 20 | Q=0 21 | R=0 22 | S=0 23 | T=0 24 | U=0 25 | V=1 26 | W=0 27 | X=1 28 | Y=1 29 | Z=1 30 | ShowHints=1 31 | ShowWarnings=1 32 | UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 33 | NamespacePrefix= 34 | SymbolDeprecated=1 35 | SymbolLibrary=1 36 | SymbolPlatform=1 37 | UnitLibrary=1 38 | UnitPlatform=1 39 | UnitDeprecated=1 40 | HResultCompat=1 41 | HidingMember=1 42 | HiddenVirtual=1 43 | Garbage=1 44 | BoundsError=1 45 | ZeroNilCompat=1 46 | StringConstTruncated=1 47 | ForLoopVarVarPar=1 48 | TypedConstVarPar=1 49 | AsgToTypedConst=1 50 | CaseLabelRange=1 51 | ForVariable=1 52 | ConstructingAbstract=1 53 | ComparisonFalse=1 54 | ComparisonTrue=1 55 | ComparingSignedUnsigned=1 56 | CombiningSignedUnsigned=1 57 | UnsupportedConstruct=1 58 | FileOpen=1 59 | FileOpenUnitSrc=1 60 | BadGlobalSymbol=1 61 | DuplicateConstructorDestructor=1 62 | InvalidDirective=1 63 | PackageNoLink=1 64 | PackageThreadVar=1 65 | ImplicitImport=1 66 | HPPEMITIgnored=1 67 | NoRetVal=1 68 | UseBeforeDef=1 69 | ForLoopVarUndef=1 70 | UnitNameMismatch=1 71 | NoCFGFileFound=1 72 | MessageDirective=1 73 | ImplicitVariants=1 74 | UnicodeToLocale=1 75 | LocaleToUnicode=1 76 | ImagebaseMultiple=1 77 | SuspiciousTypecast=1 78 | PrivatePropAccessor=1 79 | UnsafeType=0 80 | UnsafeCode=0 81 | UnsafeCast=0 82 | [Linker] 83 | MapFile=0 84 | OutputObjs=0 85 | ConsoleApp=1 86 | DebugInfo=0 87 | RemoteSymbols=0 88 | MinStackSize=16384 89 | MaxStackSize=1048576 90 | ImageBase=4194304 91 | ExeDescription= 92 | [Directories] 93 | OutputDir= 94 | UnitOutputDir= 95 | PackageDLLOutputDir= 96 | PackageDCPOutputDir= 97 | SearchPath= 98 | Packages=vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;VclSmp;vclactnband;vclshlctrls;dclOfficeXP;Jcl;JvStdCtrlsD7R;JvAppFrmD7R;JvCoreD7R;JvCmpD7R;JvCtrlsD7R;JvCustomD7R;JvDockingD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvSystemD7R;JvWizardD7R;JvXPCtrlsD7R;dbrtl;vcldb;dbexpress 99 | Conditionals= 100 | DebugSourceDirs= 101 | UsePackages=0 102 | [Parameters] 103 | RunParams= 104 | HostApplication= 105 | Launcher= 106 | UseLauncher=0 107 | DebugCWD= 108 | [Version Info] 109 | IncludeVerInfo=0 110 | AutoIncBuild=0 111 | MajorVer=1 112 | MinorVer=0 113 | Release=0 114 | Build=0 115 | Debug=0 116 | PreRelease=0 117 | Special=0 118 | Private=0 119 | DLL=0 120 | Locale=1031 121 | CodePage=1252 122 | [Version Info Keys] 123 | CompanyName= 124 | FileDescription= 125 | FileVersion=1.0.0.0 126 | InternalName= 127 | LegalCopyright= 128 | LegalTrademarks= 129 | OriginalFilename= 130 | ProductName= 131 | ProductVersion=1.0.0.0 132 | Comments= 133 | [Excluded Packages] 134 | C:\Borland\Delphi7\Bin\dclclxstd70.bpl=Borland CLX-Standardkomponenten 135 | c:\borland\delphi7\Bin\dclite70.bpl=Borland ITE (Integrated Translation Environment) 136 | c:\borland\delphi7\Bin\dclmid70.bpl=Borland MyBase-Datenzugriffskomponenten 137 | c:\borland\delphi7\Bin\dcldbxcds70.bpl=Borland SimpleDataset-Komponente (DBX) 138 | c:\borland\delphi7\Bin\dclclxdb70.bpl=Borland CLX-Datenbankkomponenten 139 | c:\borland\delphi7\Bin\dclocx70.bpl=Borland Importierte Beipspiel-ActiveX-Steuerelemente 140 | [HistoryLists\hlUnitAliases] 141 | Count=1 142 | Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 143 | [HistoryLists\hlUnitOutputDirectory] 144 | Count=1 145 | Item0=..\lib 146 | [HistoryLists\hlOutputDirectorry] 147 | Count=1 148 | Item0=..\bin 149 | [HistoryLists\hlBPLOutput] 150 | Count=1 151 | Item0=..\bin 152 | [HistoryLists\hlDCPOutput] 153 | Count=1 154 | Item0=..\lib 155 | -------------------------------------------------------------------------------- /CompileInterceptor/Example/ExampleCompileInterceptor.dpr: -------------------------------------------------------------------------------- 1 | library ExampleCompileInterceptor; 2 | 3 | uses 4 | SysUtils, 5 | Classes, 6 | InterceptIntf in '..\Source\InterceptIntf.pas'; 7 | 8 | {$R *.res} 9 | 10 | type 11 | TExampleInterceptor = class(TInterfacedObject, ICompileInterceptor) 12 | public 13 | function GetOptions: TCompileInterceptOptions; stdcall; 14 | function GetVirtualFile(Filename: PAnsiChar): IVirtualStream; stdcall; 15 | function AlterFile(Filename: PAnsiChar; Content: PAnsiChar; 16 | FileDate: Integer; FileSize: Integer): IVirtualStream; stdcall; 17 | end; 18 | 19 | procedure Done; stdcall; 20 | begin 21 | end; 22 | 23 | procedure EntryPoint(const CompileInterceptorServices: ICompileInterceptorServices; var DoneProc: TDoneProc); stdcall; 24 | begin 25 | DoneProc := Done; 26 | CompileInterceptorServices.RegisterInterceptor(TExampleInterceptor.Create); 27 | end; 28 | 29 | exports 30 | EntryPoint name CompileInterceptorEntryPoint; 31 | 32 | { TExampleInterceptor } 33 | 34 | function TExampleInterceptor.AlterFile(Filename, Content: PAnsiChar; 35 | FileDate, FileSize: Integer): IVirtualStream; 36 | begin 37 | Result := nil; 38 | end; 39 | 40 | function TExampleInterceptor.GetOptions: TCompileInterceptOptions; 41 | begin 42 | Result := CIO_VIRTUALFILES; 43 | end; 44 | 45 | function TExampleInterceptor.GetVirtualFile(Filename: PAnsiChar): IVirtualStream; 46 | begin 47 | if SameText(ExtractFileName(Filename), 'test.inc') then 48 | Result := T 49 | Result := nil; 50 | end; 51 | 52 | begin 53 | end. 54 | -------------------------------------------------------------------------------- /CompileInterceptor/Example/ExampleCompileInterceptor.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/CompileInterceptor/Example/ExampleCompileInterceptor.res -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptor.cfg: -------------------------------------------------------------------------------- 1 | -$A8 2 | -$B- 3 | -$C+ 4 | -$D+ 5 | -$E- 6 | -$F- 7 | -$G+ 8 | -$H+ 9 | -$I+ 10 | -$J- 11 | -$K- 12 | -$L+ 13 | -$M- 14 | -$N+ 15 | -$O+ 16 | -$P+ 17 | -$Q- 18 | -$R- 19 | -$S- 20 | -$T- 21 | -$U- 22 | -$V+ 23 | -$W- 24 | -$X+ 25 | -$YD 26 | -$Z1 27 | -cg 28 | -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 29 | -H+ 30 | -W+ 31 | -M 32 | -$M16384,1048576 33 | -K$23400000 34 | -E"..\bin" 35 | -N"..\lib" 36 | -LE"..\bin" 37 | -LN"..\lib" 38 | -w-UNSAFE_TYPE 39 | -w-UNSAFE_CODE 40 | -w-UNSAFE_CAST 41 | -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptor.dof: -------------------------------------------------------------------------------- 1 | [FileVersion] 2 | Version=7.0 3 | [Compiler] 4 | A=8 5 | B=0 6 | C=1 7 | D=1 8 | E=0 9 | F=0 10 | G=1 11 | H=1 12 | I=1 13 | J=0 14 | K=0 15 | L=1 16 | M=0 17 | N=1 18 | O=1 19 | P=1 20 | Q=0 21 | R=0 22 | S=0 23 | T=0 24 | U=0 25 | V=1 26 | W=0 27 | X=1 28 | Y=1 29 | Z=1 30 | ShowHints=1 31 | ShowWarnings=1 32 | UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 33 | NamespacePrefix= 34 | SymbolDeprecated=1 35 | SymbolLibrary=1 36 | SymbolPlatform=1 37 | UnitLibrary=1 38 | UnitPlatform=1 39 | UnitDeprecated=1 40 | HResultCompat=1 41 | HidingMember=1 42 | HiddenVirtual=1 43 | Garbage=1 44 | BoundsError=1 45 | ZeroNilCompat=1 46 | StringConstTruncated=1 47 | ForLoopVarVarPar=1 48 | TypedConstVarPar=1 49 | AsgToTypedConst=1 50 | CaseLabelRange=1 51 | ForVariable=1 52 | ConstructingAbstract=1 53 | ComparisonFalse=1 54 | ComparisonTrue=1 55 | ComparingSignedUnsigned=1 56 | CombiningSignedUnsigned=1 57 | UnsupportedConstruct=1 58 | FileOpen=1 59 | FileOpenUnitSrc=1 60 | BadGlobalSymbol=1 61 | DuplicateConstructorDestructor=1 62 | InvalidDirective=1 63 | PackageNoLink=1 64 | PackageThreadVar=1 65 | ImplicitImport=1 66 | HPPEMITIgnored=1 67 | NoRetVal=1 68 | UseBeforeDef=1 69 | ForLoopVarUndef=1 70 | UnitNameMismatch=1 71 | NoCFGFileFound=1 72 | MessageDirective=1 73 | ImplicitVariants=1 74 | UnicodeToLocale=1 75 | LocaleToUnicode=1 76 | ImagebaseMultiple=1 77 | SuspiciousTypecast=1 78 | PrivatePropAccessor=1 79 | UnsafeType=0 80 | UnsafeCode=0 81 | UnsafeCast=0 82 | [Linker] 83 | MapFile=0 84 | OutputObjs=0 85 | ConsoleApp=1 86 | DebugInfo=0 87 | RemoteSymbols=0 88 | MinStackSize=16384 89 | MaxStackSize=1048576 90 | ImageBase=591396864 91 | ExeDescription= 92 | [Directories] 93 | OutputDir=..\bin 94 | UnitOutputDir=..\lib 95 | PackageDLLOutputDir=..\bin 96 | PackageDCPOutputDir=..\lib 97 | SearchPath= 98 | Packages=vcl;rtl;designide 99 | Conditionals= 100 | DebugSourceDirs= 101 | UsePackages=0 102 | [Parameters] 103 | RunParams=-rBareBones 104 | HostApplication=$(DELPHI)\Bin\delphi32.exe 105 | Launcher= 106 | UseLauncher=0 107 | DebugCWD= 108 | [Version Info] 109 | IncludeVerInfo=1 110 | AutoIncBuild=0 111 | MajorVer=1 112 | MinorVer=0 113 | Release=0 114 | Build=0 115 | Debug=0 116 | PreRelease=0 117 | Special=0 118 | Private=0 119 | DLL=1 120 | Locale=1033 121 | CodePage=1252 122 | [Version Info Keys] 123 | CompanyName= 124 | FileDescription= 125 | FileVersion=1.0.0.0 126 | InternalName=CompileInterceptor 127 | LegalCopyright=(C) 2006 Andreas Hausladen 128 | LegalTrademarks= 129 | OriginalFilename=CompileInterceptor.dll 130 | ProductName=CompileInterceptor 131 | ProductVersion=1.0.0.0 132 | Comments= 133 | [Excluded Packages] 134 | C:\Borland\Delphi7\Bin\dclclxstd70.bpl=Borland CLX-Standardkomponenten 135 | c:\borland\delphi7\Bin\dclite70.bpl=Borland ITE (Integrated Translation Environment) 136 | C:\Borland\Delphi7\Bin\dclmid70.bpl=Borland MyBase-Datenzugriffskomponenten 137 | c:\borland\delphi7\Bin\dclocx70.bpl=Borland Importierte Beipspiel-ActiveX-Steuerelemente 138 | c:\borland\delphi7\Bin\dcldbxcds70.bpl=Borland SimpleDataset-Komponente (DBX) 139 | c:\borland\delphi7\Bin\dclclxdb70.bpl=Borland CLX-Datenbankkomponenten 140 | C:\Borland\Delphi7\Projects\Bpl\JclVersionControlExpert70.bpl=JCL Integration of version control systems in the IDE 141 | [HistoryLists\hlUnitAliases] 142 | Count=1 143 | Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; 144 | [HistoryLists\hlUnitOutputDirectory] 145 | Count=1 146 | Item0=..\lib 147 | [HistoryLists\hlOutputDirectorry] 148 | Count=1 149 | Item0=..\bin 150 | [HistoryLists\hlBPLOutput] 151 | Count=1 152 | Item0=..\bin 153 | [HistoryLists\hlDCPOutput] 154 | Count=1 155 | Item0=..\lib 156 | -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptor.inc: -------------------------------------------------------------------------------- 1 | {$I ..\..\Code\DDevExtensions\jedi\jedi.inc} 2 | 3 | -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptorW.dpr: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* CompileInterceptor IDE Plugin *} 4 | {* *} 5 | {* (C) 2006 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | // JCL_DEBUG_EXPERT_INSERTJDBG OFF 10 | 11 | library CompileInterceptorW; 12 | 13 | {$I CompileInterceptor.inc} 14 | 15 | {$IF CompilerVersion >= 21.0} 16 | {$WEAKLINKRTTI ON} 17 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} 18 | {$IFEND} 19 | 20 | uses 21 | ShareMem, 22 | Windows, 23 | SysUtils, 24 | Classes, 25 | Registry, 26 | CompilerHooks in 'CompilerHooks.pas', 27 | FileStreams in 'FileStreams.pas', 28 | InterceptIntf in 'InterceptIntf.pas', 29 | InterceptImpl in 'InterceptImpl.pas', 30 | IdeDllNames in 'IdeDllNames.pas', 31 | ToolsAPIIntf in 'ToolsAPIIntf.pas'; 32 | 33 | {$R *.res} 34 | { 35 | const 36 | WizardEntryPoint = 'INITWIZARD0001'; 37 | 38 | type 39 | TWizardRegisterProc = function(const Wizard: IInterface): Boolean; 40 | TWizardTerminateProc = procedure; 41 | 42 | var 43 | Libs: array of record 44 | h: HMODULE; 45 | DoneProc: TDoneProc; 46 | end; 47 | 48 | procedure DoneWizard; 49 | var 50 | i: Integer; 51 | begin 52 | try 53 | for i := 0 to High(Libs) do 54 | if Assigned(Libs[i].DoneProc) then 55 | Libs[i].DoneProc; 56 | finally 57 | FiniCompileInterceptor; // release interfaces first 58 | end; 59 | 60 | for i := 0 to High(Libs) do 61 | if Libs[i].h <> 0 then 62 | FreeLibrary(Libs[i].h); 63 | end; 64 | 65 | function InitWizard(const BorlandIDEServices: IInterface; 66 | RegisterProc: TWizardRegisterProc; var Terminate: TWizardTerminateProc): Boolean; stdcall; 67 | var 68 | Reg: TRegistry; 69 | List: TStrings; 70 | i: Integer; 71 | EntryPoint: TCompileInterceptorEntryPoint; 72 | begin 73 | Terminate := DoneWizard; 74 | Result := True; 75 | 76 | InitCompileInterceptor; 77 | 78 | Reg := TRegistry.Create; 79 | try 80 | Reg.RootKey := HKEY_CURRENT_USER; 81 | if Reg.OpenKeyReadOnly('\Software\DelphiTools\CompileInterceptor\Plugins') then 82 | begin 83 | List := TStringList.Create; 84 | try 85 | Reg.GetValueNames(List); 86 | SetLength(Libs, List.Count); 87 | for i := 0 to List.Count - 1 do 88 | if (Reg.ReadString(List[i]) <> '') and FileExists(List[i]) then 89 | begin 90 | Libs[i].h := LoadLibrary(PChar(List[i])); 91 | if Libs[i].h <> 0 then 92 | begin 93 | EntryPoint := GetProcAddress(Libs[i].h, CompileInterceptorEntryPoint); 94 | if Assigned(EntryPoint) then 95 | EntryPoint(CompileInterceptorServices, Libs[i].DoneProc); 96 | end; 97 | end; 98 | finally 99 | List.Free; 100 | end; 101 | end; 102 | finally 103 | Reg.Free; 104 | end; 105 | end; 106 | 107 | exports 108 | InitWizard name WizardEntryPoint;} 109 | 110 | begin 111 | end. 112 | -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptorW.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/CompileInterceptor/Source/CompileInterceptorW.res -------------------------------------------------------------------------------- /CompileInterceptor/Source/CompileInterceptorW_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/CompileInterceptor/Source/CompileInterceptorW_Icon.ico -------------------------------------------------------------------------------- /CompileInterceptor/Source/IdeDllNames.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* CompileInterceptor IDE Plugin *} 4 | {* *} 5 | {* (C) 2006-2013 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit IdeDllNames; 10 | 11 | interface 12 | 13 | uses 14 | Windows, SysUtils; 15 | 16 | const 17 | LastSupportedIDEVersion = 350; // adjust ToolsAPIIntf.pas if necessary 18 | 19 | var 20 | bcbide_bpl: PChar; 21 | coreide_bpl: PChar; 22 | rtl_bpl: PChar; 23 | vcl_bpl: PChar; 24 | delphicoreide_bpl: PChar; 25 | designide_bpl: PChar; 26 | DelphiVersion: string; 27 | DelphiVer: Integer; 28 | 29 | const 30 | bcbide5_bpl = 'bcbide50.bpl'; 31 | coreide5_bpl = 'coride50.bpl'; 32 | rtl5_bpl = 'vcl50.bpl'; 33 | vcl5_bpl = 'vcl50.bpl'; 34 | delphicoreide5_bpl = coreide5_bpl; 35 | designide5_bpl = 'dsnide50.bpl'; 36 | 37 | bcbide6_bpl = 'bcbide60.bpl'; 38 | coreide6_bpl = 'coreide60.bpl'; 39 | rtl6_bpl = 'rtl60.bpl'; 40 | vcl6_bpl = 'vcl60.bpl'; 41 | delphicoreide6_bpl = coreide6_bpl; 42 | designide6_bpl = 'designide60.bpl'; 43 | 44 | bcbide7_bpl = 'bcbide70.bpl'; 45 | coreide7_bpl = 'coreide70.bpl'; 46 | rtl7_bpl = 'rtl70.bpl'; 47 | vcl7_bpl = 'vcl70.bpl'; 48 | delphicoreide7_bpl = coreide7_bpl; 49 | designide7_bpl = 'designide70.bpl'; 50 | 51 | // Galileo IDE: 52 | bcbide_base_bpl = 'bcbide.bpl'; 53 | coreide_base_bpl = 'coreide.bpl'; 54 | rtl_base_bpl = 'rtl.bpl'; 55 | vcl_base_bpl = 'vcl.bpl'; 56 | delphicoreide_base_bpl = 'delphicoreide.bpl'; 57 | vclide_base_bpl = 'vclide.bpl'; 58 | designide_base_bpl = 'designide.bpl'; 59 | 60 | implementation 61 | 62 | var 63 | StrMemAllocated: Boolean = False; 64 | 65 | procedure MakeVersionDll(var Name: PChar; const DllName, VersionStr: string); 66 | begin 67 | if Name <> nil then 68 | StrDispose(Name); 69 | Name := StrNew(PChar(ChangeFileExt(DllName, VersionStr + ExtractFileExt(DllName)))); 70 | end; 71 | 72 | procedure FreeStrMem; 73 | begin 74 | StrDispose(coreide_bpl); 75 | StrDispose(bcbide_bpl); 76 | StrDispose(rtl_bpl); 77 | StrDispose(vcl_bpl); 78 | StrDispose(delphicoreide_bpl); 79 | StrDispose(designide_bpl); 80 | StrMemAllocated := False; 81 | end; 82 | 83 | function InitVersion: Boolean; 84 | var 85 | Version: Integer; 86 | VersionStr: string; 87 | begin 88 | Version := 90; 89 | while Version <= LastSupportedIDEVersion do 90 | begin 91 | VersionStr := IntToStr(Version); 92 | MakeVersionDll(coreide_bpl, coreide_base_bpl, VersionStr); 93 | if GetModuleHandle(coreide_bpl) <> 0 then 94 | begin 95 | MakeVersionDll(bcbide_bpl, bcbide_base_bpl, VersionStr); 96 | MakeVersionDll(rtl_bpl, rtl_base_bpl, VersionStr); 97 | MakeVersionDll(vcl_bpl, vcl_base_bpl, VersionStr); 98 | MakeVersionDll(delphicoreide_bpl, delphicoreide_base_bpl, VersionStr); 99 | MakeVersionDll(designide_bpl, designide_base_bpl, VersionStr); 100 | 101 | DelphiVer := Version div 10; 102 | DelphiVersion := IntToStr(DelphiVer); 103 | 104 | StrMemAllocated := True; 105 | Result := True; 106 | Exit; 107 | end; 108 | Inc(Version, 10); 109 | end; 110 | StrDispose(coreide_bpl); 111 | coreide_bpl := nil; 112 | Result := False; 113 | end; 114 | 115 | initialization 116 | if not InitVersion then 117 | begin 118 | if GetModuleHandle(coreide7_bpl) <> 0 then 119 | begin 120 | bcbide_bpl := bcbide7_bpl; 121 | coreide_bpl := coreide7_bpl; 122 | rtl_bpl := rtl7_bpl; 123 | vcl_bpl := vcl7_bpl; 124 | delphicoreide_bpl := delphicoreide7_bpl; 125 | designide_bpl := designide7_bpl; 126 | DelphiVersion := '7'; 127 | DelphiVer := 7 128 | end 129 | else 130 | if GetModuleHandle(coreide6_bpl) <> 0 then 131 | begin 132 | bcbide_bpl := bcbide6_bpl; 133 | coreide_bpl := coreide6_bpl; 134 | rtl_bpl := rtl6_bpl; 135 | vcl_bpl := vcl6_bpl; 136 | delphicoreide_bpl := delphicoreide6_bpl; 137 | designide_bpl := designide6_bpl; 138 | DelphiVersion := '6'; 139 | DelphiVer := 6 140 | end 141 | else 142 | if GetModuleHandle(coreide5_bpl) <> 0 then 143 | begin 144 | bcbide_bpl := bcbide5_bpl; 145 | coreide_bpl := coreide5_bpl; 146 | rtl_bpl := rtl5_bpl; 147 | vcl_bpl := vcl5_bpl; 148 | delphicoreide_bpl := delphicoreide5_bpl; 149 | designide_bpl := designide5_bpl; 150 | DelphiVersion := '5'; 151 | DelphiVer := 5 152 | end 153 | else 154 | MessageBox(0, 'No compatible Delphi version loaded', 'CompileInterceptor', MB_OK or MB_ICONERROR); 155 | end; 156 | 157 | finalization 158 | if StrMemAllocated then 159 | FreeStrMem; 160 | 161 | end. 162 | 163 | -------------------------------------------------------------------------------- /CompileInterceptor/Source/InterceptLoader.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2009 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit InterceptLoader; 10 | 11 | interface 12 | 13 | uses 14 | Windows, SysUtils, InterceptIntf; 15 | 16 | function GetCompileInterceptorServices: ICompileInterceptorServices; 17 | procedure UnloadCompilerInterceptorServices; 18 | 19 | implementation 20 | 21 | {function GetCompileInterceptorServices: ICompileInterceptorServices; stdcall; 22 | external 'CompileInterceptorW.dll' name 'GetCompileInterceptorServices';} 23 | 24 | var 25 | _GetCompileInterceptorServices: function: ICompileInterceptorServices; stdcall; 26 | CompilerInterceptorLib: THandle; 27 | 28 | function GetCompileInterceptorServices: ICompileInterceptorServices; 29 | begin 30 | if not Assigned(_GetCompileInterceptorServices) then 31 | begin 32 | CompilerInterceptorLib := SafeLoadLibrary(PChar(ExtractFilePath(GetModuleName(HInstance)) + 'CompileInterceptorW.dll')); 33 | if CompilerInterceptorLib = 0 then 34 | CompilerInterceptorLib := SafeLoadLibrary('CompileInterceptorW.dll'); // search all PATHs 35 | if CompilerInterceptorLib <> 0 then 36 | _GetCompileInterceptorServices := GetProcAddress(CompilerInterceptorLib, 'GetCompileInterceptorServices'); 37 | end; 38 | if Assigned(_GetCompileInterceptorServices) then 39 | Result := _GetCompileInterceptorServices() 40 | else 41 | raise Exception.Create('Cannot find CompileInterceptorW.dll'); 42 | end; 43 | 44 | procedure UnloadCompilerInterceptorServices; 45 | begin 46 | _GetCompileInterceptorServices := nil; 47 | if CompilerInterceptorLib <> 0 then 48 | begin 49 | CompilerInterceptorLib := 0; 50 | FreeLibrary(CompilerInterceptorLib); 51 | end; 52 | end; 53 | 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /CompileInterceptor/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SETLOCAL 4 | 5 | cd Source 6 | 7 | call "C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin\rsvars.bat" 8 | msbuild /nologo /t:Build /p:Configuration=Release CompileInterceptorW.dproj 9 | if ERRORLEVEL 1 goto Error1 10 | 11 | :: rebuild with Delphi 2009 (much smaller file). XE2 is required for the .res file 12 | call "C:\CodeGear\RAD Studio\6.0\bin\rsvars.bat" 13 | msbuild /nologo /t:Build /p:Configuration=Release CompileInterceptorW.dproj 14 | if ERRORLEVEL 1 goto Error1 15 | 16 | cd .. 17 | 18 | 19 | :: =========================================== 20 | goto Leave 21 | :Error1 22 | cd .. 23 | :Error0 24 | pause 25 | 26 | 27 | :Leave 28 | ENDLOCAL -------------------------------------------------------------------------------- /CompileInterceptor/buildAnsi.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET BORLAND=C:\Borland 4 | SET P=%PATH% 5 | 6 | ::copy source\AppConsts.pas Installer\AppConsts.pas >NUL 7 | 8 | echo === Delphi 10 ============================== 9 | 10 | SET PATH=%Borland%\BDS\4.0\Bin;C:\Windows\System32 11 | cd source 12 | dcc32 -B -GD CompileInterceptor.dpr 13 | if ERRORLEVEL 1 goto Error1 14 | 15 | ::cd Installer 16 | ::dcc32 -B InstallDelphiSpeedUp10.dpr 17 | ::if ERRORLEVEL 1 goto Error1 18 | cd .. 19 | 20 | 21 | :: =========================================== 22 | goto Leave 23 | :Error1 24 | cd .. 25 | :Error0 26 | pause 27 | 28 | 29 | :Leave 30 | SET PATH=%P% 31 | SET P= 32 | SET BORLAND= 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DDevExtensions 2 | Homepage: https://www.idefixpack.de/ddev 3 | 4 | DDevExtensions adds new features to RAD Studio. 5 | 6 | Supported Delphi Versions 10.2, 10.3, 10.4, 11.x, 12.0 7 | 8 | ## Releases Delphi 2009-10.4 9 | 10 | Until there are new releases the releases are still available at 11 | https://www.idefixpack.de/ddev 12 | 13 | ## Release Delphi 11.x, 12.0 14 | 15 | A precompiled version can be downloaded from the DelphiPraxis fork: 16 | https://github.com/DelphiPraxis/DDevExtensions/releases 17 | 18 | 19 | ## Compile 20 | 21 | Requires: jedi\jedi.inc file (from https://github.com/project-jedi/jedi) in the IDE's source path. 22 | 23 | In the `Code\DDevExtensions folder` open the `DDevExtensions.groupproj` file in the Delphi IDE. 24 | The file is in the D_D102 (Delphi 10.2), D_D103 (Delphi 10.3), D_D104 (Delphi 10.4), ... folder. 25 | 26 | 27 | ## How to install 28 | 29 | Simply start the DDevExtensionsReg.exe. 30 | 31 | This will copy files to $(APPDATA)\DDevExtensions and it registers the expert DLLs 32 | in the registry. 33 | 34 | 35 | ## How to uninstall 36 | 37 | Start the InstallDDevExtensions.exe and press the button. 38 | 39 | 40 | ## Features 41 | 42 | - Disable Package Cache (default: off) 43 | - Disable Source Formatter hotkey (default: off) 44 | - Show project for active file in Project Manager (default: on) 45 | - Editor tab double click action (default: zoom) 46 | - Structure View Search (default: no hotkey) 47 | - Increment Build Number only when building the project (default: on) [2010 only] 48 | - Set TLabel.Margins.Bottom to zero (default: on) 49 | - Remove Explicit* properties (default: off) 50 | - Component Selector (default: off, no hotkey) 51 | - Disable “Source has been modified. Rebuild?” (default: on) 52 | - Auto-save editor files after successful compile (default: off) 53 | - Switch project to current file’s project (default: on) 54 | - Put “Last Compile” time into version info (default: off) [2009-XE] 55 | - Find Unit/Use Unit replacement dialog (default: on) 56 | - File Cleaner (default: on) 57 | - Compile Backup (default: on) 58 | - Loading package tweaks 59 | - Enhanced Key Bindings (default: on) 60 | - Old Component Palette (default: off) [2009-10.2] 61 | - Set Project Versioninfo dialog 62 | - Compile Progress improvements (progressbar, taskbar progress) 63 | - Replace “Package Add Unit” dialog with “File Open” dialog [2009 only] 64 | - Close and Kill the IDE 65 | - Replace Open File At Cursor (default: off) 66 | - Show all inheritable modules (default: off) 67 | - Don’t break when starting spawned processes (default: off) 68 | - Disable Code folding (default: off) [2009 only] 69 | - Kill all dexplore.exe when closing the IDE (default: on) 70 | - Show confirmation dialog for Ctrl+F1 while debugging (default: on) 71 | - Release compiler unit cache before compiling (default: off) 72 | - Improved reload changed files dialog 73 | - Local Start Parameters (default: off) [2009-XE] 74 | - Project Start Parameters (default: off) 75 | -------------------------------------------------------------------------------- /Shared/IDE/FrmBase.dfm: -------------------------------------------------------------------------------- 1 | object FormBase: TFormBase 2 | Left = 192 3 | Top = 114 4 | Caption = 'FormBase' 5 | ClientHeight = 302 6 | ClientWidth = 477 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | end 17 | -------------------------------------------------------------------------------- /Shared/IDE/FrmBase.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2008 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | {$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N-,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1} 9 | 10 | unit FrmBase; 11 | 12 | interface 13 | 14 | uses 15 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, 16 | Dialogs; 17 | 18 | type 19 | TFormBase = class(TForm) 20 | private 21 | { Private-Deklarationen } 22 | protected 23 | procedure DoClose(var Action: TCloseAction); override; 24 | procedure DoShow; override; 25 | public 26 | { Public-Deklarationen } 27 | constructor Create(AOwner: TComponent); override; 28 | function ShowModal: Integer; override; 29 | end; 30 | 31 | var 32 | FormBase: TFormBase; 33 | 34 | implementation 35 | 36 | uses 37 | HtHint; 38 | 39 | {$R *.dfm} 40 | 41 | type 42 | PPointer = ^Pointer; 43 | {$IF not declared(SIZE_T)} 44 | SIZE_T = DWORD; 45 | {$IFEND} 46 | 47 | TControlAccess = class(TControl); 48 | 49 | function GetVirtualMethod(AClass: TClass; const Index: Integer): Pointer; 50 | begin 51 | Result := PPointer(PAnsiChar(AClass) + Index * SizeOf(Pointer))^; 52 | end; 53 | 54 | procedure SetVirtualMethod(AClass: TClass; const Index: Integer; const Method: Pointer); 55 | var 56 | WrittenBytes: SIZE_T; 57 | PatchAddress: PPointer; 58 | begin 59 | PatchAddress := Pointer(PAnsiChar(AClass) + Index * SizeOf(Pointer)); 60 | WriteProcessMemory(GetCurrentProcess, PatchAddress, @Method, SizeOf(Method), WrittenBytes); 61 | end; 62 | 63 | procedure ReaderError(Self: TObject; Reader: TReader; const Message: string; var Handled: Boolean); 64 | begin 65 | Handled := True; 66 | end; 67 | 68 | function IgnoreReader_NewInstance(AClass: TClass): TObject; 69 | var 70 | M: TMethod; 71 | begin 72 | M.Code := @ReaderError; 73 | M.Data := nil; 74 | Result := TReader.NewInstance; 75 | TReader(Result).OnError := TReaderError(M); 76 | end; 77 | 78 | { TFormBase } 79 | 80 | constructor TFormBase.Create(AOwner: TComponent); 81 | const 82 | {$WARNINGS OFF} 83 | Index = vmtNewInstance div SizeOf(Pointer); 84 | {$WARNINGS ON} 85 | var 86 | NewInst: procedure; 87 | begin 88 | NewInst := GetVirtualMethod(TReader, Index); 89 | try 90 | SetVirtualMethod(TReader, Index, @IgnoreReader_NewInstance); 91 | inherited Create(AOwner); 92 | finally 93 | SetVirtualMethod(TReader, Index, @NewInst); 94 | end; 95 | Font.Name := UTF8ToString(DefFontData.Name); 96 | Font.Height := DefFontData.Height; 97 | end; 98 | 99 | procedure TFormBase.DoClose(var Action: TCloseAction); 100 | begin 101 | inherited DoClose(Action); 102 | if Action <> caNone then 103 | begin 104 | // Save state 105 | end; 106 | end; 107 | 108 | procedure TFormBase.DoShow; 109 | 110 | // Set the dialogs base font name to every control that uses "Tahoma" (all MS Sans Serif were eliminated) 111 | procedure SetControlFonts(ParentControl: TWinControl); 112 | var 113 | I: Integer; 114 | Control: TControl; 115 | begin 116 | for I := 0 to ParentControl.ControlCount - 1 do 117 | begin 118 | Control := ParentControl.Controls[I]; 119 | if TControlAccess(Control).Font.Name = 'Tahoma' then 120 | TControlAccess(Control).Font.Name := Self.Font.Name; 121 | if Control is TWinControl then 122 | SetControlFonts(TWinControl(Control)); 123 | end; 124 | end; 125 | 126 | begin 127 | // restore state 128 | inherited DoShow; 129 | 130 | if Self.Font.Name <> 'Tahoma' then 131 | SetControlFonts(Self); 132 | end; 133 | 134 | function TFormBase.ShowModal: Integer; 135 | var 136 | HintClass: THintWindowClass; 137 | HintHidePause: Integer; 138 | begin 139 | HintHidePause := Application.HintHidePause; 140 | HintClass := HintWindowClass; 141 | try 142 | HintWindowClass := THtHintWindow; 143 | Application.HintHidePause := 30000; 144 | Result := inherited ShowModal; 145 | finally 146 | Application.HintHidePause := HintHidePause; 147 | HintWindowClass := HintClass; 148 | end; 149 | end; 150 | 151 | end. 152 | 153 | -------------------------------------------------------------------------------- /Shared/IDE/Options/FrmOptions.dfm: -------------------------------------------------------------------------------- 1 | inherited FormOptions: TFormOptions 2 | Left = 243 3 | Top = 179 4 | Caption = 'Application - Options' 5 | PixelsPerInch = 96 6 | TextHeight = 13 7 | inherited PanelButtons: TPanel 8 | object lblURL: TLabel [1] 9 | Left = 6 10 | Top = 21 11 | Width = 166 12 | Height = 13 13 | Cursor = crHandPoint 14 | Hint = 'mailto:Andreas.Hausladen@gmx.de?subject=' 15 | Caption = '(C) 2005-2009 Andreas Hausladen' 16 | Font.Charset = DEFAULT_CHARSET 17 | Font.Color = clBlue 18 | Font.Height = -11 19 | Font.Name = 'Tahoma' 20 | Font.Style = [] 21 | ParentFont = False 22 | OnClick = lblURLClick 23 | end 24 | object Label1: TLabel [2] 25 | Left = 6 26 | Top = 4 27 | Width = 51 28 | Height = 13 29 | Cursor = crHandPoint 30 | Hint = 'https://www.idefixpack.de/blog' 31 | Caption = 'Homepage' 32 | Font.Charset = DEFAULT_CHARSET 33 | Font.Color = clBlue 34 | Font.Height = -11 35 | Font.Name = 'Tahoma' 36 | Font.Style = [] 37 | ParentFont = False 38 | OnClick = lblURLClick 39 | end 40 | object lblVersion: TLabel [3] 41 | Left = 182 42 | Top = 21 43 | Width = 54 44 | Height = 13 45 | Caption = 'Version x.y' 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Shared/IDE/Options/FrmOptions.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* DDevExtensions *} 4 | {* *} 5 | {* (C) 2006-2009 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | {$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N-,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1} 9 | 10 | unit FrmOptions; 11 | 12 | interface 13 | 14 | uses 15 | Windows, Messages, SysUtils, Classes, Contnrs, Graphics, Controls, Forms, 16 | Dialogs, FrmTreePages, StdCtrls, ExtCtrls, ComCtrls, ShellAPI; 17 | 18 | type 19 | TOptionPagesEvent = function: TTreePage of object; 20 | TOptionPagesProc = function: TTreePage; 21 | 22 | TFormOptions = class(TFormTreePages) 23 | lblURL: TLabel; 24 | Label1: TLabel; 25 | lblVersion: TLabel; 26 | procedure lblURLClick(Sender: TObject); 27 | private 28 | { Private-Deklarationen } 29 | protected 30 | class function GetGlobalOptionPages: TObjectList; virtual; 31 | class procedure SetGlobalOptionPages(Value: TObjectList); virtual; 32 | procedure PopulateRootPage(Root: TTreePage); override; 33 | public 34 | { Public-Deklarationen } 35 | class procedure RegisterPages(const OptionPages: TOptionPagesEvent); 36 | class procedure UnregisterPages(const OptionPages: TOptionPagesEvent); 37 | class procedure RegisterPagesEx(const OptionPages: TOptionPagesProc); 38 | class procedure UnregisterPagesEx(const OptionPages: TOptionPagesProc); 39 | end; 40 | 41 | implementation 42 | 43 | {$R *.dfm} 44 | 45 | var 46 | GlobalOptionPages: TObjectList; 47 | 48 | type 49 | TOptionPages = class(TObject) 50 | Event: TOptionPagesEvent; 51 | Proc: TOptionPagesProc; 52 | end; 53 | 54 | { TFormOptions } 55 | 56 | class procedure TFormOptions.SetGlobalOptionPages(Value: TObjectList); 57 | begin 58 | GlobalOptionPages := Value; 59 | end; 60 | 61 | class function TFormOptions.GetGlobalOptionPages: TObjectList; 62 | begin 63 | Result := GlobalOptionPages; 64 | end; 65 | 66 | class procedure TFormOptions.RegisterPages(const OptionPages: TOptionPagesEvent); 67 | var 68 | Item: TOptionPages; 69 | begin 70 | if GetGlobalOptionPages = nil then 71 | SetGlobalOptionPages(TObjectList.Create); 72 | 73 | Item := TOptionPages.Create; 74 | Item.Event := OptionPages; 75 | GetGlobalOptionPages.Add(Item); 76 | end; 77 | 78 | class procedure TFormOptions.UnregisterPages(const OptionPages: TOptionPagesEvent); 79 | var 80 | i: Integer; 81 | begin 82 | if GetGlobalOptionPages <> nil then 83 | begin 84 | for i := GetGlobalOptionPages.Count - 1 downto 0 do 85 | begin 86 | if CompareMem(Addr(TMethod(TOptionPages(GetGlobalOptionPages[i]).Event)), Addr(TMethod(OptionPages)), SizeOf(TMethod)) then 87 | begin 88 | GetGlobalOptionPages.Delete(i); 89 | Break; 90 | end; 91 | end; 92 | end; 93 | end; 94 | 95 | class procedure TFormOptions.RegisterPagesEx(const OptionPages: TOptionPagesProc); 96 | var 97 | Item: TOptionPages; 98 | begin 99 | if GetGlobalOptionPages = nil then 100 | SetGlobalOptionPages(TObjectList.Create); 101 | 102 | Item := TOptionPages.Create; 103 | Item.Proc := OptionPages; 104 | GetGlobalOptionPages.Add(Item); 105 | end; 106 | 107 | class procedure TFormOptions.UnregisterPagesEx(const OptionPages: TOptionPagesProc); 108 | var 109 | i: Integer; 110 | begin 111 | if GetGlobalOptionPages <> nil then 112 | begin 113 | for i := GetGlobalOptionPages.Count - 1 downto 0 do 114 | begin 115 | if Addr(TOptionPages(GetGlobalOptionPages[i]).Proc) <> Addr(OptionPages) then 116 | begin 117 | GetGlobalOptionPages.Delete(i); 118 | Break; 119 | end; 120 | end; 121 | end; 122 | end; 123 | 124 | procedure TFormOptions.PopulateRootPage(Root: TTreePage); 125 | var 126 | i: Integer; 127 | OptionPages: TOptionPages; 128 | begin 129 | if GetGlobalOptionPages <> nil then 130 | begin 131 | for i := 0 to GetGlobalOptionPages.Count - 1 do 132 | begin 133 | OptionPages := TOptionPages(GetGlobalOptionPages[i]); 134 | if Assigned(OptionPages.Event) then 135 | Root.Add(OptionPages.Event()) 136 | else 137 | Root.Add(OptionPages.Proc()); 138 | end; 139 | end; 140 | end; 141 | 142 | procedure TFormOptions.lblURLClick(Sender: TObject); 143 | begin 144 | with TLabel(Sender) do 145 | begin 146 | if ShellExecute(Handle, 'open', PChar(Hint), nil, nil, SW_SHOWMAXIMIZED) < 32 then 147 | begin 148 | Font.Color := clWindowText; 149 | Font.Style := []; 150 | OnClick := nil; 151 | end; 152 | end; 153 | end; 154 | 155 | initialization 156 | 157 | finalization 158 | FreeAndNil(GlobalOptionPages); 159 | 160 | end. 161 | -------------------------------------------------------------------------------- /Shared/IDE/Options/FrmTreePages.dfm: -------------------------------------------------------------------------------- 1 | inherited FormTreePages: TFormTreePages 2 | Left = 267 3 | Top = 292 4 | BorderStyle = bsDialog 5 | Caption = 'TreePages' 6 | ClientHeight = 440 7 | ClientWidth = 701 8 | OldCreateOrder = True 9 | Position = poScreenCenter 10 | OnCreate = FormCreate 11 | OnShow = FormShow 12 | PixelsPerInch = 96 13 | TextHeight = 13 14 | object PanelButtons: TPanel 15 | Left = 0 16 | Top = 403 17 | Width = 701 18 | Height = 37 19 | Align = alBottom 20 | BevelOuter = bvNone 21 | TabOrder = 0 22 | object bvlDivider: TBevel 23 | Left = 0 24 | Top = 0 25 | Width = 701 26 | Height = 2 27 | Align = alTop 28 | end 29 | object btnOk: TButton 30 | Left = 539 31 | Top = 6 32 | Width = 75 33 | Height = 25 34 | Caption = '&OK' 35 | Default = True 36 | ModalResult = 1 37 | TabOrder = 0 38 | end 39 | object btnCancel: TButton 40 | Left = 620 41 | Top = 6 42 | Width = 75 43 | Height = 25 44 | Cancel = True 45 | Caption = '&Cancel' 46 | ModalResult = 2 47 | TabOrder = 1 48 | end 49 | end 50 | object PanelWorkingArea: TPanel 51 | Left = 0 52 | Top = 0 53 | Width = 701 54 | Height = 403 55 | Align = alClient 56 | BevelOuter = bvNone 57 | BorderWidth = 5 58 | TabOrder = 1 59 | object TreeView: TTreeView 60 | Left = 5 61 | Top = 5 62 | Width = 177 63 | Height = 393 64 | Align = alLeft 65 | HideSelection = False 66 | Indent = 19 67 | ReadOnly = True 68 | RightClickSelect = True 69 | RowSelect = True 70 | TabOrder = 0 71 | OnChange = TreeViewChange 72 | end 73 | object PanelClient: TPanel 74 | Left = 182 75 | Top = 5 76 | Width = 514 77 | Height = 393 78 | Align = alClient 79 | BevelOuter = bvNone 80 | TabOrder = 1 81 | object SplitterTree: TSplitter 82 | Left = 0 83 | Top = 0 84 | Height = 393 85 | AutoSnap = False 86 | end 87 | end 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /Shared/PascalParser/DelphiExpr.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DelphiPraxis/DDevExtensions/0d781e5dd202f87a728f65941bfc0783197dac5f/Shared/PascalParser/DelphiExpr.pas -------------------------------------------------------------------------------- /Shared/PascalParser/DelphiParser.inc: -------------------------------------------------------------------------------- 1 | {$I ..\jedi\jedi.inc} 2 | -------------------------------------------------------------------------------- /Shared/PascalParser/DelphiParserContainers.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* Container classes *} 4 | {* *} 5 | {* (C) 2005 Andreas Hausladen *} 6 | {* *} 7 | {******************************************************************************} 8 | 9 | unit DelphiParserContainers; 10 | 11 | {$I ..\jedi\jedi.inc} 12 | 13 | {$IFDEF COMPILER10_UP} 14 | {$DEFINE D9} 15 | {$ENDIF} 16 | 17 | interface 18 | 19 | uses 20 | SysUtils, Classes; 21 | 22 | type 23 | THashtableStringList = class(TStringList) 24 | protected 25 | function CompareStrings(const S1: string; const S2: string): Integer; override; 26 | end; 27 | 28 | THashtable = class(TObject) 29 | private 30 | FItems: THashtableStringList; 31 | FOwnsObjects: Boolean; 32 | function GetCount: Integer; {$IFDEF D9}inline;{$ENDIF} 33 | function GetValue(const AKey: string): TObject; {$IFDEF D9}inline;{$ENDIF} 34 | function GetItem(Index: Integer): TObject; {$IFDEF D9}inline;{$ENDIF} 35 | public 36 | constructor Create(CaseSensitive: Boolean; AOwnsObjects: Boolean = True); 37 | destructor Destroy; override; 38 | procedure Clear; 39 | 40 | procedure Remove(const AKey: string); 41 | procedure Add(const AKey: string; AValue: TObject); {$IFDEF D9}inline;{$ENDIF} 42 | function Contains(const AKey: string): Boolean; {$IFDEF D9}inline;{$ENDIF} 43 | 44 | property Values[const AKey: string]: TObject read GetValue; default; 45 | property Items[Index: Integer]: TObject read GetItem; 46 | property Count: Integer read GetCount; 47 | end; 48 | 49 | TIntegerList = class(TList) 50 | private 51 | function GetItem(Index: Integer): Integer; {$IFDEF D9}inline;{$ENDIF} 52 | procedure SetItem(Index: Integer; const Value: Integer);{$IFDEF D9}inline;{$ENDIF} 53 | public 54 | function Add(Value: Integer): Integer; {$IFDEF D9}inline;{$ENDIF} 55 | property Items[Index: Integer]: Integer read GetItem write SetItem; default; 56 | end; 57 | 58 | TStringDictionary = class(TObject) 59 | private 60 | FItems: THashtableStringList; 61 | FValues: TStringList; 62 | function GetCount: Integer; 63 | function GetValue(const AKey: string): string; 64 | public 65 | constructor Create; 66 | destructor Destroy; override; 67 | 68 | procedure Add(const AKey: string; const AValue: string); 69 | function Contains(const AKey: string): Boolean; 70 | function Find(const AKey: string): string; 71 | 72 | property Values[const AKey: string]: string read GetValue; default; 73 | property Count: Integer read GetCount; 74 | end; 75 | 76 | TStringCollection = class(TStringList) 77 | public 78 | function Contains(const Value: string): Boolean; 79 | procedure RemoveAt(Index: Integer); 80 | end; 81 | 82 | implementation 83 | 84 | { THashtable } 85 | 86 | constructor THashtable.Create(CaseSensitive: Boolean; AOwnsObjects: Boolean); 87 | begin 88 | inherited Create; 89 | FOwnsObjects := AOwnsObjects; 90 | FItems := THashtableStringList.Create; 91 | FItems.Sorted := True; 92 | FItems.Duplicates := dupError; 93 | {$IFDEF COMPILER6_UP} 94 | FItems.CaseSensitive := CaseSensitive; 95 | {$ELSE} 96 | Assert(CaseSensitive = False, 'TStringList has no CaseSensitive property in Delphi 5'); 97 | {$ENDIF COMPILER6_UP} 98 | end; 99 | 100 | destructor THashtable.Destroy; 101 | var 102 | i: Integer; 103 | begin 104 | if FOwnsObjects then 105 | for i := 0 to Count - 1 do 106 | FItems.Objects[i].Free; 107 | FItems.Free; 108 | inherited Destroy; 109 | end; 110 | 111 | function THashtable.Contains(const AKey: string): Boolean; 112 | begin 113 | Result := FItems.IndexOf(AKey) >= 0; 114 | end; 115 | 116 | function THashtable.GetCount: Integer; 117 | begin 118 | Result := FItems.Count; 119 | end; 120 | 121 | procedure THashtable.Add(const AKey: string; AValue: TObject); 122 | begin 123 | FItems.AddObject(AKey, AValue); 124 | end; 125 | 126 | function THashtable.GetValue(const AKey: string): TObject; 127 | var 128 | Index: Integer; 129 | begin 130 | if FItems.Find(AKey, Index) then 131 | Result := FItems.Objects[Index] 132 | else 133 | Result := nil; 134 | end; 135 | 136 | procedure THashtable.Remove(const AKey: string); 137 | var 138 | Index: Integer; 139 | begin 140 | if FItems.Find(AKey, Index) then 141 | begin 142 | if FOwnsObjects then 143 | FItems.Objects[Index].Free; 144 | FItems.Delete(Index); 145 | end; 146 | end; 147 | 148 | procedure THashtable.Clear; 149 | begin 150 | FItems.Clear; 151 | end; 152 | 153 | function THashtable.GetItem(Index: Integer): TObject; 154 | begin 155 | Result := FItems.Objects[Index]; 156 | end; 157 | 158 | { TIntegerList } 159 | 160 | function TIntegerList.GetItem(Index: Integer): Integer; 161 | begin 162 | Result := Integer(inherited Items[Index]); 163 | end; 164 | 165 | function TIntegerList.Add(Value: Integer): Integer; 166 | begin 167 | Result := inherited Add(Pointer(Value)); 168 | end; 169 | 170 | procedure TIntegerList.SetItem(Index: Integer; const Value: Integer); 171 | begin 172 | inherited Items[Index] := Pointer(Value); 173 | end; 174 | 175 | { TStringCollection } 176 | 177 | function TStringCollection.Contains(const Value: string): Boolean; 178 | begin 179 | Result := IndexOf(Value) >= 0; 180 | end; 181 | 182 | procedure TStringCollection.RemoveAt(Index: Integer); 183 | begin 184 | Delete(Index); 185 | end; 186 | 187 | { TStringDictionary } 188 | 189 | constructor TStringDictionary.Create; 190 | begin 191 | inherited Create; 192 | FItems := THashtableStringList.Create; 193 | FValues := TStringList.Create; 194 | FItems.Sorted := True; 195 | FItems.Duplicates := dupError; 196 | end; 197 | 198 | destructor TStringDictionary.Destroy; 199 | begin 200 | FItems.Free; 201 | FValues.Free; 202 | inherited Destroy; 203 | end; 204 | 205 | function TStringDictionary.GetCount: Integer; 206 | begin 207 | Result := FItems.Count; 208 | end; 209 | 210 | function TStringDictionary.GetValue(const AKey: string): string; 211 | var 212 | Index: Integer; 213 | begin 214 | Result := ''; 215 | if FItems.Find(AKey, Index) then 216 | if Integer(FItems.Objects[Index]) >= 0 then 217 | Result := FValues[Integer(FItems.Objects[Index])]; 218 | end; 219 | 220 | procedure TStringDictionary.Add(const AKey: string; const AValue: string); 221 | begin 222 | FItems.AddObject(AKey, Pointer(FValues.Add(AValue))); 223 | end; 224 | 225 | function TStringDictionary.Contains(const AKey: string): Boolean; 226 | var 227 | Index: Integer; 228 | begin 229 | Result := FItems.Find(AKey, Index); 230 | end; 231 | 232 | function TStringDictionary.Find(const AKey: string): string; 233 | begin 234 | Result := Values[AKey]; 235 | end; 236 | 237 | { THashtableStringList } 238 | 239 | function THashtableStringList.CompareStrings(const S1, S2: string): Integer; 240 | begin 241 | if CaseSensitive then 242 | Result := CompareStr(S1, S2) 243 | else 244 | Result := CompareText(S1, S2); 245 | end; 246 | 247 | end. 248 | -------------------------------------------------------------------------------- /Shared/Xml/SimpleXmlImport.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* (C) 2006 Andreas Hausladen *} 4 | {* *} 5 | {******************************************************************************} 6 | 7 | unit SimpleXmlImport; 8 | 9 | interface 10 | 11 | uses 12 | SimpleXmlIntf, SimpleXmlDoc; 13 | 14 | var 15 | LoadXmlDocument: function(const Filename: string): IXmlDocument 16 | = SimpleXmlDoc.LoadXmlDocument; 17 | NewXmlDocument: function(const Version: string = ''): IXmlDocument 18 | = SimpleXmlDoc.NewXmlDocument; 19 | 20 | {function LoadXmlDocument(const Filename: string): IXmlDocument; 21 | external 'DDevExXml.dll'; 22 | function NewXmlDocument(const Version: string = ''): IXmlDocument; 23 | external 'DDevExXml.dll';} 24 | 25 | implementation 26 | 27 | end. 28 | -------------------------------------------------------------------------------- /Shared/Xml/SimpleXmlIntf.pas: -------------------------------------------------------------------------------- 1 | {******************************************************************************} 2 | {* *} 3 | {* (C) 2005,2006 Andreas Hausladen *} 4 | {* *} 5 | {******************************************************************************} 6 | {$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N-,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1} 7 | 8 | unit SimpleXmlIntf; 9 | 10 | interface 11 | 12 | type 13 | TNodeType = (ntReserved, ntElement, ntAttribute, ntText, ntCData, 14 | ntEntityRef, ntEntity, ntProcessingInstr, ntComment, ntDocument, 15 | ntDocType, ntDocFragment, ntNotation); 16 | 17 | TXmlDocOption = (doNodeAutoCreate, doNodeAutoIndent, doAttrNull, 18 | doAutoPrefix, doNamespaceDecl, doAutoSave); 19 | TXmlDocOptions = set of TXmlDocOption; 20 | 21 | IXmlNode = interface; 22 | 23 | IXmlChildNodes = interface 24 | ['{AEC5C57C-75E1-4143-BFD6-5C91C48178D6}'] 25 | function GetCount: Integer; 26 | function GetNode(Index: Integer): IXmlNode; 27 | function FindNode(const NodeName: string): IXmlNode; 28 | 29 | procedure Add(Node: IXmlNode); 30 | procedure Clear; 31 | procedure DeleteNodes(const NodeName: string); 32 | 33 | property Count: Integer read GetCount; 34 | property Nodes[Index: Integer]: IXmlNode read GetNode; default; 35 | end; 36 | 37 | IXmlAttributes = interface 38 | ['{3EDE3B74-F849-4169-B245-28447BCF8AFB}'] 39 | procedure SetAttribute(const Index: string; const Value: Variant); 40 | function GetAttribute(const Index: string): Variant; 41 | property Attributes[const Index: string]: Variant read GetAttribute write SetAttribute; default; 42 | end; 43 | 44 | IXmlNode = interface 45 | ['{550EAFEC-429D-4C37-8F7C-B552E2071D59}'] 46 | function GetNodeName: string; 47 | function GetNodeValue: Variant; 48 | function GetChildNodes: IXmlChildNodes; 49 | function GetAttributes: IXmlAttributes; 50 | function GetText: string; 51 | procedure SetText(const Value: string); 52 | //procedure SetNodeName(const Value: string); 53 | procedure SetNodeValue(const Value: Variant); 54 | 55 | function AddChild(const NodeName: string): IXmlNode; 56 | 57 | property NodeName: string read GetNodeName {write SetNodeName}; 58 | property NodeValue: Variant read GetNodeValue write SetNodeValue; 59 | property Text: string read GetText write SetText; 60 | property ChildNodes: IXmlChildNodes read GetChildNodes; 61 | property Attributes: IXmlAttributes read GetAttributes; 62 | end; 63 | 64 | IXmlDocument = interface 65 | ['{6C02535D-924E-48A9-83C3-5A79897A54B5}'] 66 | function GetActive: Boolean; 67 | procedure SetActive(Value: Boolean); 68 | function GetVersion: string; 69 | procedure SetVersion(const Value: string); 70 | function GetDocumentElement: IXMLNode; 71 | procedure SetDocumentElement(Value: IXMLNode); 72 | function GetRoot: IXmlNode; 73 | function GetOptions: TXmlDocOptions; 74 | procedure SetOptions(const Value: TXmlDocOptions); 75 | function GetChildNodes: IXmlChildNodes; 76 | 77 | function CreateElement(const Tag, NamespaceURI: string): IXmlNode; 78 | function CreateNode(const Name: string; NodeType: TNodeType = ntElement; 79 | const AddlData: string = ''): IXmlNode; 80 | 81 | procedure LoadFromFile(const Filename: string); 82 | procedure SaveToFile(const Filename: string); 83 | 84 | property Active: Boolean read GetActive write SetActive; 85 | property Root: IXmlNode read GetRoot; 86 | property DocumentElement: IXMLNode read GetDocumentElement write SetDocumentElement; 87 | property Version: string read GetVersion write SetVersion; 88 | property Options: TXmlDocOptions read GetOptions write SetOptions; 89 | property ChildNodes: IXmlChildNodes read GetChildNodes; 90 | end; 91 | 92 | implementation 93 | 94 | end. 95 | -------------------------------------------------------------------------------- /Tools/LinkMapFile/ReadMe.md: -------------------------------------------------------------------------------- 1 | linkmapfile.exe created from 2 | 3 | https://github.com/project-jedi/jvcl/tree/master/jvcl/packages/bin --------------------------------------------------------------------------------