├── Resources ├── DWScriptExpert.rc ├── DWS24.bmp └── DWScriptExpert.RES ├── Source ├── DWScriptExpert.rc ├── DWScriptExpertForm.pas ├── DWScriptExpertAbout.pas ├── DWScriptExpertWizard.pas ├── DWScriptExpertAbout.dfm └── DWScriptExpertModule.pas ├── Scripts └── DelphiASTNodeInfo.dws ├── DLL ├── DWScriptExpert.dpr └── DWScriptExpert.dproj ├── Packages ├── DWScriptExpert.dpk ├── XE8 │ └── DWScriptExpert.dpk ├── XE │ └── DWScriptExpert.dpk ├── XE3 │ └── DWScriptExpert.dpk ├── XE4 │ └── DWScriptExpert.dpk ├── XE5 │ └── DWScriptExpert.dpk ├── XE6 │ └── DWScriptExpert.dpk ├── XE2 │ └── DWScriptExpert.dpk └── XE7 │ └── DWScriptExpert.dpk ├── .gitignore ├── README.md └── LICENSE /Resources/DWScriptExpert.rc: -------------------------------------------------------------------------------- 1 | SPLASHSCREENBITMAP BITMAP DWS24.bmp -------------------------------------------------------------------------------- /Source/DWScriptExpert.rc: -------------------------------------------------------------------------------- 1 | SplashScreenBitmap BITMAP "..\Resources\DWS24.bmp" 2 | -------------------------------------------------------------------------------- /Resources/DWS24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CWBudde/DWScriptExpert/HEAD/Resources/DWS24.bmp -------------------------------------------------------------------------------- /Resources/DWScriptExpert.RES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CWBudde/DWScriptExpert/HEAD/Resources/DWScriptExpert.RES -------------------------------------------------------------------------------- /Source/DWScriptExpertForm.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CWBudde/DWScriptExpert/HEAD/Source/DWScriptExpertForm.pas -------------------------------------------------------------------------------- /Source/DWScriptExpertAbout.pas: -------------------------------------------------------------------------------- 1 | unit DWScriptExpertAbout; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 | StdCtrls, Vcl.Imaging.pngimage, ExtCtrls; 8 | 9 | type 10 | TFormAbout = class(TForm) 11 | Image: TImage; 12 | ButtonOK: TButton; 13 | LabelTitle: TLabel; 14 | LabelCopyright: TLabel; 15 | LabelUses: TLabel; 16 | end; 17 | 18 | implementation 19 | 20 | {$R *.dfm} 21 | 22 | end. 23 | 24 | -------------------------------------------------------------------------------- /Scripts/DelphiASTNodeInfo.dws: -------------------------------------------------------------------------------- 1 | procedure VisualizeNode(Node: TSyntaxNode; Level: Integer); 2 | var 3 | NodeInfo: String; 4 | begin 5 | // build node information 6 | NodeInfo := '(' + IntToStr(Node.Line) + ', ' + IntToStr(Node.Col) + ')'; 7 | if Node.HasAttribute(anName) then 8 | NodeInfo := Node.GetAttribute(anName) + ' ' + NodeInfo; 9 | if Node.HasAttribute(anType) then 10 | NodeInfo := Node.GetAttribute(anType) + ' ' + NodeInfo; 11 | (* 12 | if Node.HasAttribute('name') then 13 | NodeInfo := Node.GetAttribute('name') + ' ' + NodeInfo; 14 | *) 15 | NodeInfo := SyntaxNodeTypeToName(Node.&Type) + ': ' + NodeInfo; 16 | 17 | // indention 18 | NodeInfo := DupeString(' ', 2 * Level) + NodeInfo; 19 | 20 | // show node info 21 | PrintLn(NodeInfo); 22 | 23 | for var Index := 0 to Node.ChildNodeCount - 1 do 24 | VisualizeNode(Node.ChildNode[Index], Level + 1); 25 | end; 26 | 27 | var RootNode := GetAbstractSyntaxTree; 28 | 29 | if Assigned(RootNode) then 30 | VisualizeNode(GetAbstractSyntaxTree, 0); 31 | -------------------------------------------------------------------------------- /DLL/DWScriptExpert.dpr: -------------------------------------------------------------------------------- 1 | library DWScriptExpert; 2 | 3 | {$IFDEF VER210} // RAD Studio 2010 4 | {$LIBSUFFIX 'D2010'} 5 | {$ENDIF} 6 | {$IFDEF VER220} // RAD Studio XE 7 | {$LIBSUFFIX 'XE'} 8 | {$ENDIF} 9 | {$IFDEF VER230} // RAD Studio XE2 10 | {$LIBSUFFIX 'XE2'} 11 | {$ENDIF} 12 | {$IFDEF VER240} // RAD Studio XE3 13 | {$LIBSUFFIX 'XE3'} 14 | {$ENDIF} 15 | {$IFDEF VER250} // RAD Studio XE4 16 | {$LIBSUFFIX 'XE4'} 17 | {$ENDIF} 18 | {$IFDEF VER260} // RAD Studio XE5 19 | {$LIBSUFFIX 'XE5'} 20 | {$ENDIF} 21 | {$IFDEF VER270} // RAD Studio XE6 22 | {$LIBSUFFIX 'XE6'} 23 | {$ENDIF} 24 | {$IFDEF VER280} // RAD Studio XE7 25 | {$LIBSUFFIX 'XE7'} 26 | {$ENDIF} 27 | {$IFDEF VER290} // RAD Studio XE8 28 | {$LIBSUFFIX 'XE8'} 29 | {$ENDIF} 30 | 31 | uses 32 | ShareMem, 33 | SysUtils, 34 | Classes, 35 | DWScriptExpertForm in '..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 36 | DWScriptExpertModule in '..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 37 | DWScriptExpertAbout in '..\Source\DWScriptExpertAbout.pas' {FormAbout}, 38 | DWScriptExpertWizard in '..\Source\DWScriptExpertWizard.pas'; 39 | 40 | begin 41 | end. 42 | 43 | -------------------------------------------------------------------------------- /Packages/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | designide, 34 | rtl, 35 | IndyCore, 36 | IndySystem, 37 | IndyProtocols, 38 | VirtualTreesR, 39 | SynEdit_R, 40 | dwsLibRuntime, 41 | WebUpdateR, 42 | vclimg; 43 | 44 | contains 45 | DWScriptExpertForm in '..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 46 | DWScriptExpertModule in '..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 47 | DWScriptExpertAbout in '..\Source\DWScriptExpertAbout.pas' {FormAbout}; 48 | 49 | end. 50 | -------------------------------------------------------------------------------- /Packages/XE8/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE8'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. -------------------------------------------------------------------------------- /Packages/XE/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /Packages/XE3/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE3'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /Packages/XE4/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE4'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /Packages/XE5/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE5'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /Packages/XE6/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE6'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}; 49 | 50 | end. 51 | -------------------------------------------------------------------------------- /Packages/XE2/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R *.res} 4 | {$R '..\..\Source\DWScriptExpert.res'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO ON} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE2'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | rtl, 36 | IndyCore, 37 | IndySystem, 38 | IndyProtocols, 39 | VirtualTreesR, 40 | SynEdit_R, 41 | dwsLibRuntime, 42 | WebUpdateR, 43 | vclimg; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}, 49 | DWScriptExpertWizard in '..\..\Source\DWScriptExpertWizard.pas'; 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /Packages/XE7/DWScriptExpert.dpk: -------------------------------------------------------------------------------- 1 | package DWScriptExpert; 2 | 3 | {$R '..\..\Resource\DWScriptExpert.res'} 4 | {$R *.res} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION OFF} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES ON} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'DWScript Expert'} 30 | {$LIBSUFFIX 'XE7'} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | DesignIDE, 35 | RTL, 36 | VclImg, 37 | IndyCore, 38 | IndySystem, 39 | IndyProtocols, 40 | dwsLibRuntime, 41 | VirtualTreesR, 42 | SynEdit_R, 43 | WebUpdateR; 44 | 45 | contains 46 | DWScriptExpertForm in '..\..\Source\DWScriptExpertForm.pas' {DWScriptExpertDockForm}, 47 | DWScriptExpertModule in '..\..\Source\DWScriptExpertModule.pas' {DataModuleScript: TDataModule}, 48 | DWScriptExpertAbout in '..\..\Source\DWScriptExpertAbout.pas' {FormAbout}, 49 | DWScriptExpertWizard in '..\..\Source\DWScriptExpertWizard.pas'; 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /.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 | 25 | # Delphi compiler-generated binaries (safe to delete) 26 | *.exe 27 | *.dll 28 | *.bpl 29 | *.bpi 30 | *.dcp 31 | *.so 32 | *.apk 33 | *.drc 34 | *.map 35 | *.dres 36 | *.rsm 37 | *.tds 38 | *.dcu 39 | *.lib 40 | 41 | # Delphi autogenerated files (duplicated info) 42 | *.cfg 43 | *Resource.rc 44 | 45 | # Delphi local files (user-specific info) 46 | *.local 47 | *.identcache 48 | *.projdata 49 | *.tvsconfig 50 | *.dsk 51 | 52 | # Delphi history and backups 53 | __history/ 54 | *.~* 55 | 56 | # Castalia statistics file 57 | *.stat 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DWScriptExpert 2 | DWScript Expert is a Delphi IDE expert to add the power of DWScript to the Delphi IDE 3 | 4 | There are times during the development with the Delphi IDE, that a more extensive script language is needed. For example it's sometimes not enough to perform a replace operation and even the keyboard macro recorder might be not flexible enough. 5 | In my case I wanted to delete all occurences of '_' in function names and instead make the following character upperspace, so that 'Some_function' becomes 'SomeFunction'. At the same time this should not be performed for strings (e.g. in C library imported names). With the power of the DelphiAST project, however, it's possible to understand the Delphi code and with this, it's possible to iterate only over functions. I could have written a dedicated expert for this, but I wanted something more general. 6 | 7 | With the DWScript Expert it's possible to outsource the expert code to scripts, that can easily be loaded on demand. 8 | 9 | It's also possible to write scripts to perform some calculations, which might be too heavy for a calculator. Such as spit out all prime numbers below 100, etc. 10 | 11 | This expert is under the Mozilla Public License Version 1.1 and far from being complete. The internal API will be expanded one by one, so either help out, or be patient if a feature you'd like to use is missing. 12 | 13 | What works so far (beyond everything that inherits from DWScript) are simple things like: 14 | * SetCursorPosition(Line, Column: Integer) 15 | * LocateText(Pattern: String) 16 | * ReplaceAll(Pattern, ReplaceText: String) 17 | * SelectCurrentWord 18 | * MoveOneWordRight/Left ([CTRL] + RightArrow/LeftArrow) 19 | 20 | Also with the power of DelphiAST it's also possible to iterate through the abstract syntax tree of the active unit. 21 | -------------------------------------------------------------------------------- /Source/DWScriptExpertWizard.pas: -------------------------------------------------------------------------------- 1 | unit DWScriptExpertWizard; 2 | 3 | interface 4 | 5 | uses 6 | Menus, SysUtils, ToolsAPI, DWScriptExpertForm; 7 | 8 | type 9 | TDWScriptExpertWizard = class(TNotifierObject, IOTAWizard) 10 | protected 11 | procedure Execute; 12 | 13 | function GetIDString: string; 14 | function GetName: string; 15 | function GetState: TWizardState; 16 | // function GetMenuText: string; 17 | public 18 | constructor Create; 19 | destructor Destroy; override; 20 | end; 21 | 22 | TCustomMenuHandler = class(TObject) 23 | procedure HandleClick(Sender: TObject); 24 | end; 25 | 26 | var 27 | GDockForm: TDWScriptExpertDockForm; 28 | GViewScriptMenuItem: TMenuItem; 29 | 30 | procedure Register; 31 | 32 | implementation 33 | 34 | uses 35 | DeskUtil, Windows; 36 | 37 | var 38 | GSeparatorMenuItem: TMenuItem; 39 | GCustomMenuHandler: TCustomMenuHandler; 40 | {$IF CompilerVersion >= 17.0} 41 | GSplashScreenBitmap: HBITMAP; 42 | GAboutPluginIndex: Integer; 43 | {$IFEND} 44 | 45 | 46 | { TDWScriptExpertWizard } 47 | 48 | constructor TDWScriptExpertWizard.Create; 49 | begin 50 | inherited; 51 | 52 | end; 53 | 54 | destructor TDWScriptExpertWizard.Destroy; 55 | begin 56 | 57 | inherited; 58 | end; 59 | 60 | procedure TDWScriptExpertWizard.Execute; 61 | begin 62 | 63 | end; 64 | 65 | function TDWScriptExpertWizard.GetIDString: string; 66 | begin 67 | Result := 'DWScriptExpert'; 68 | end; 69 | 70 | (* 71 | function TDWScriptExpertWizard.GetMenuText: string; 72 | begin 73 | Result := 'DWScript Expert'; 74 | end; 75 | *) 76 | 77 | function TDWScriptExpertWizard.GetName: string; 78 | begin 79 | Result := 'DWScript Expert'; 80 | end; 81 | 82 | function TDWScriptExpertWizard.GetState: TWizardState; 83 | begin 84 | Result := [wsEnabled]; 85 | end; 86 | 87 | 88 | { TCustomMenuHandler } 89 | 90 | procedure TCustomMenuHandler.HandleClick(Sender: TObject); 91 | begin 92 | GDockForm.Visible := not GDockForm.Visible; 93 | GViewScriptMenuItem.Checked := GDockForm.Visible; 94 | end; 95 | 96 | 97 | procedure AddIDEMenu; 98 | var 99 | NTAServices: INTAServices40; 100 | const 101 | CItemName = 'DWScript Expert'; 102 | begin 103 | NTAServices := BorlandIDEServices as INTAServices40; 104 | 105 | // avoid inserting twice 106 | if NTAServices.MainMenu.Items[3].Find(CItemName) = nil then 107 | begin 108 | GCustomMenuHandler := TCustomMenuHandler.Create; 109 | 110 | GSeparatorMenuItem := TMenuItem.Create(nil); 111 | GSeparatorMenuItem.Caption := '-'; 112 | NTAServices.MainMenu.Items[3].Add(GSeparatorMenuItem); 113 | 114 | GViewScriptMenuItem := TMenuItem.Create(nil); 115 | GViewScriptMenuItem.Caption := CItemName; 116 | GViewScriptMenuItem.OnClick := GCustomMenuHandler.HandleClick; 117 | NTAServices.MainMenu.Items[3].Add(GViewScriptMenuItem); 118 | end; 119 | end; 120 | 121 | procedure RemoveIDEMenu; 122 | var 123 | NTAServices: INTAServices40; 124 | begin 125 | if Assigned(GViewScriptMenuItem) then 126 | begin 127 | NTAServices := BorlandIDEServices as INTAServices40; 128 | NTAServices.MainMenu.Items[3].Remove(GViewScriptMenuItem); 129 | GViewScriptMenuItem.Free; 130 | end; 131 | 132 | if Assigned(GSeparatorMenuItem) then 133 | begin 134 | NTAServices := BorlandIDEServices as INTAServices40; 135 | NTAServices.MainMenu.Items[3].Remove(GSeparatorMenuItem); 136 | GSeparatorMenuItem.Free; 137 | end; 138 | 139 | if Assigned(GCustomMenuHandler) then 140 | GCustomMenuHandler.Free; 141 | end; 142 | 143 | procedure RegisterDockableForm(FormClass: TDWScriptExpertDockFormClass; 144 | var FormVar; const FormName: string); 145 | begin 146 | if @RegisterFieldAddress <> nil then 147 | RegisterFieldAddress(FormName, @FormVar); 148 | RegisterDesktopFormClass(FormClass, FormName, FormName); 149 | end; 150 | 151 | procedure UnRegisterDockableForm(var FormVar); 152 | begin 153 | if @UnRegisterFieldAddress <> nil then 154 | UnregisterFieldAddress(@FormVar); 155 | end; 156 | 157 | procedure CreateDockForm; 158 | begin 159 | // Create the form 160 | if GDockForm = nil then 161 | begin 162 | GDockForm := TDWScriptExpertDockForm.Create(nil); 163 | (* 164 | GDockForm.Visible := True; 165 | GViewScriptMenuItem.Checked := GDockForm.Visible; 166 | *) 167 | 168 | // Register to save position with the IDE 169 | RegisterDockableForm(TDWScriptExpertDockForm, GDockForm, 170 | 'DWScriptExpertDockForm'); 171 | end; 172 | end; 173 | 174 | procedure DestroyDockForm; 175 | begin 176 | if Assigned(GDockForm) then 177 | begin 178 | // Cleanup dockable form instance 179 | UnRegisterDockableForm(GDockForm); 180 | FreeAndNil(GDockForm); 181 | end; 182 | end; 183 | 184 | procedure ShowDockableForm(Form: TDWScriptExpertDockForm); 185 | begin 186 | if not Assigned(Form) then 187 | Exit; 188 | if not Form.Floating then 189 | begin 190 | Form.ForceShow; 191 | FocusWindow(Form); 192 | end 193 | else 194 | Form.Show; 195 | end; 196 | 197 | var 198 | Wizard: Integer = 0; 199 | 200 | function InitializeWizard(BorlandIDEServices: IBorlandIDEServices): IOTAWizard; 201 | var 202 | Svcs : IOTAServices; 203 | begin 204 | (* 205 | Svcs := BorlandIDEServices As IOTAServices; 206 | ToolsAPI.BorlandIDEServices := BorlandIDEServices; 207 | Application.Handle := Svcs.GetParentHandle; 208 | *) 209 | 210 | {$IF CompilerVersion >= 17.0} 211 | GAboutPluginIndex := (BorlandIDEServices As IOTAAboutBoxServices).AddPluginInfo( 212 | 'DWScript Expert', 'Scripting for the Delphi IDE', GSplashScreenBitmap); 213 | {$IFEND} 214 | 215 | Result := TDWScriptExpertWizard.Create as IOTAWizard; 216 | 217 | // Application.Handle := (BorlandIDEServices As IOTAServices).GetParentHandle; 218 | 219 | AddIDEMenu; 220 | 221 | // eventually destroy currently existing dock form 222 | DestroyDockForm; 223 | 224 | // create new dock form 225 | CreateDockForm; 226 | end; 227 | 228 | function InitWizard(const BorlandIDEServices: IBorlandIDEServices; 229 | RegisterProc: TWizardRegisterProc; 230 | var Terminate: TWizardTerminateProc): Boolean; stdcall; 231 | begin 232 | Result := BorlandIDEServices <> nil; 233 | RegisterProc(InitializeWizard(BorlandIDEServices)); 234 | end; 235 | 236 | exports InitWizard name WizardEntryPoint; 237 | 238 | procedure Register; 239 | begin 240 | Wizard := (BorlandIDEServices as IOTAWizardServices).AddWizard( 241 | InitializeWizard(BorlandIDEServices)); 242 | end; 243 | 244 | initialization 245 | GViewScriptMenuItem := nil; 246 | GSeparatorMenuItem := nil; 247 | GCustomMenuHandler := nil; 248 | GSplashScreenBitmap := LoadBitmap(hInstance, 'SplashScreenBitmap'); 249 | (SplashScreenServices As IOTASplashScreenServices).AddPluginBitmap( 250 | 'DWScript Expert', GSplashScreenBitmap); 251 | 252 | 253 | finalization 254 | RemoveIDEMenu; 255 | DestroyDockForm; 256 | if Wizard > 0 then 257 | (BorlandIDEServices as IOTAWizardServices).RemoveWizard(Wizard); 258 | if GAboutPluginIndex > 0 then 259 | (BorlandIDEServices as IOTAAboutBoxServices).RemovePluginInfo(GAboutPluginIndex); 260 | 261 | end. 262 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License, version 2.0 2 | 3 | 1. Definitions 4 | 5 | 1.1. "Contributor" 6 | 7 | means each individual or legal entity that creates, contributes to the 8 | creation of, or owns Covered Software. 9 | 10 | 1.2. "Contributor Version" 11 | 12 | means the combination of the Contributions of others (if any) used by a 13 | Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | 17 | means Covered Software of a particular Contributor. 18 | 19 | 1.4. "Covered Software" 20 | 21 | means Source Code Form to which the initial Contributor has attached the 22 | notice in Exhibit A, the Executable Form of such Source Code Form, and 23 | Modifications of such Source Code Form, in each case including portions 24 | thereof. 25 | 26 | 1.5. "Incompatible With Secondary Licenses" 27 | means 28 | 29 | a. that the initial Contributor has attached the notice described in 30 | Exhibit B to the Covered Software; or 31 | 32 | b. that the Covered Software was made available under the terms of 33 | version 1.1 or earlier of the License, but not also under the terms of 34 | a Secondary License. 35 | 36 | 1.6. "Executable Form" 37 | 38 | means any form of the work other than Source Code Form. 39 | 40 | 1.7. "Larger Work" 41 | 42 | means a work that combines Covered Software with other material, in a 43 | separate file or files, that is not Covered Software. 44 | 45 | 1.8. "License" 46 | 47 | means this document. 48 | 49 | 1.9. "Licensable" 50 | 51 | means having the right to grant, to the maximum extent possible, whether 52 | at the time of the initial grant or subsequently, any and all of the 53 | rights conveyed by this License. 54 | 55 | 1.10. "Modifications" 56 | 57 | means any of the following: 58 | 59 | a. any file in Source Code Form that results from an addition to, 60 | deletion from, or modification of the contents of Covered Software; or 61 | 62 | b. any new file in Source Code Form that contains any Covered Software. 63 | 64 | 1.11. "Patent Claims" of a Contributor 65 | 66 | means any patent claim(s), including without limitation, method, 67 | process, and apparatus claims, in any patent Licensable by such 68 | Contributor that would be infringed, but for the grant of the License, 69 | by the making, using, selling, offering for sale, having made, import, 70 | or transfer of either its Contributions or its Contributor Version. 71 | 72 | 1.12. "Secondary License" 73 | 74 | means either the GNU General Public License, Version 2.0, the GNU Lesser 75 | General Public License, Version 2.1, the GNU Affero General Public 76 | License, Version 3.0, or any later versions of those licenses. 77 | 78 | 1.13. "Source Code Form" 79 | 80 | means the form of the work preferred for making modifications. 81 | 82 | 1.14. "You" (or "Your") 83 | 84 | means an individual or a legal entity exercising rights under this 85 | License. For legal entities, "You" includes any entity that controls, is 86 | controlled by, or is under common control with You. For purposes of this 87 | definition, "control" means (a) the power, direct or indirect, to cause 88 | the direction or management of such entity, whether by contract or 89 | otherwise, or (b) ownership of more than fifty percent (50%) of the 90 | outstanding shares or beneficial ownership of such entity. 91 | 92 | 93 | 2. License Grants and Conditions 94 | 95 | 2.1. Grants 96 | 97 | Each Contributor hereby grants You a world-wide, royalty-free, 98 | non-exclusive license: 99 | 100 | a. under intellectual property rights (other than patent or trademark) 101 | Licensable by such Contributor to use, reproduce, make available, 102 | modify, display, perform, distribute, and otherwise exploit its 103 | Contributions, either on an unmodified basis, with Modifications, or 104 | as part of a Larger Work; and 105 | 106 | b. under Patent Claims of such Contributor to make, use, sell, offer for 107 | sale, have made, import, and otherwise transfer either its 108 | Contributions or its Contributor Version. 109 | 110 | 2.2. Effective Date 111 | 112 | The licenses granted in Section 2.1 with respect to any Contribution 113 | become effective for each Contribution on the date the Contributor first 114 | distributes such Contribution. 115 | 116 | 2.3. Limitations on Grant Scope 117 | 118 | The licenses granted in this Section 2 are the only rights granted under 119 | this License. No additional rights or licenses will be implied from the 120 | distribution or licensing of Covered Software under this License. 121 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 122 | Contributor: 123 | 124 | a. for any code that a Contributor has removed from Covered Software; or 125 | 126 | b. for infringements caused by: (i) Your and any other third party's 127 | modifications of Covered Software, or (ii) the combination of its 128 | Contributions with other software (except as part of its Contributor 129 | Version); or 130 | 131 | c. under Patent Claims infringed by Covered Software in the absence of 132 | its Contributions. 133 | 134 | This License does not grant any rights in the trademarks, service marks, 135 | or logos of any Contributor (except as may be necessary to comply with 136 | the notice requirements in Section 3.4). 137 | 138 | 2.4. Subsequent Licenses 139 | 140 | No Contributor makes additional grants as a result of Your choice to 141 | distribute the Covered Software under a subsequent version of this 142 | License (see Section 10.2) or under the terms of a Secondary License (if 143 | permitted under the terms of Section 3.3). 144 | 145 | 2.5. Representation 146 | 147 | Each Contributor represents that the Contributor believes its 148 | Contributions are its original creation(s) or it has sufficient rights to 149 | grant the rights to its Contributions conveyed by this License. 150 | 151 | 2.6. Fair Use 152 | 153 | This License is not intended to limit any rights You have under 154 | applicable copyright doctrines of fair use, fair dealing, or other 155 | equivalents. 156 | 157 | 2.7. Conditions 158 | 159 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in 160 | Section 2.1. 161 | 162 | 163 | 3. Responsibilities 164 | 165 | 3.1. Distribution of Source Form 166 | 167 | All distribution of Covered Software in Source Code Form, including any 168 | Modifications that You create or to which You contribute, must be under 169 | the terms of this License. You must inform recipients that the Source 170 | Code Form of the Covered Software is governed by the terms of this 171 | License, and how they can obtain a copy of this License. You may not 172 | attempt to alter or restrict the recipients' rights in the Source Code 173 | Form. 174 | 175 | 3.2. Distribution of Executable Form 176 | 177 | If You distribute Covered Software in Executable Form then: 178 | 179 | a. such Covered Software must also be made available in Source Code Form, 180 | as described in Section 3.1, and You must inform recipients of the 181 | Executable Form how they can obtain a copy of such Source Code Form by 182 | reasonable means in a timely manner, at a charge no more than the cost 183 | of distribution to the recipient; and 184 | 185 | b. You may distribute such Executable Form under the terms of this 186 | License, or sublicense it under different terms, provided that the 187 | license for the Executable Form does not attempt to limit or alter the 188 | recipients' rights in the Source Code Form under this License. 189 | 190 | 3.3. Distribution of a Larger Work 191 | 192 | You may create and distribute a Larger Work under terms of Your choice, 193 | provided that You also comply with the requirements of this License for 194 | the Covered Software. If the Larger Work is a combination of Covered 195 | Software with a work governed by one or more Secondary Licenses, and the 196 | Covered Software is not Incompatible With Secondary Licenses, this 197 | License permits You to additionally distribute such Covered Software 198 | under the terms of such Secondary License(s), so that the recipient of 199 | the Larger Work may, at their option, further distribute the Covered 200 | Software under the terms of either this License or such Secondary 201 | License(s). 202 | 203 | 3.4. Notices 204 | 205 | You may not remove or alter the substance of any license notices 206 | (including copyright notices, patent notices, disclaimers of warranty, or 207 | limitations of liability) contained within the Source Code Form of the 208 | Covered Software, except that You may alter any license notices to the 209 | extent required to remedy known factual inaccuracies. 210 | 211 | 3.5. Application of Additional Terms 212 | 213 | You may choose to offer, and to charge a fee for, warranty, support, 214 | indemnity or liability obligations to one or more recipients of Covered 215 | Software. However, You may do so only on Your own behalf, and not on 216 | behalf of any Contributor. You must make it absolutely clear that any 217 | such warranty, support, indemnity, or liability obligation is offered by 218 | You alone, and You hereby agree to indemnify every Contributor for any 219 | liability incurred by such Contributor as a result of warranty, support, 220 | indemnity or liability terms You offer. You may include additional 221 | disclaimers of warranty and limitations of liability specific to any 222 | jurisdiction. 223 | 224 | 4. Inability to Comply Due to Statute or Regulation 225 | 226 | If it is impossible for You to comply with any of the terms of this License 227 | with respect to some or all of the Covered Software due to statute, 228 | judicial order, or regulation then You must: (a) comply with the terms of 229 | this License to the maximum extent possible; and (b) describe the 230 | limitations and the code they affect. Such description must be placed in a 231 | text file included with all distributions of the Covered Software under 232 | this License. Except to the extent prohibited by statute or regulation, 233 | such description must be sufficiently detailed for a recipient of ordinary 234 | skill to be able to understand it. 235 | 236 | 5. Termination 237 | 238 | 5.1. The rights granted under this License will terminate automatically if You 239 | fail to comply with any of its terms. However, if You become compliant, 240 | then the rights granted under this License from a particular Contributor 241 | are reinstated (a) provisionally, unless and until such Contributor 242 | explicitly and finally terminates Your grants, and (b) on an ongoing 243 | basis, if such Contributor fails to notify You of the non-compliance by 244 | some reasonable means prior to 60 days after You have come back into 245 | compliance. Moreover, Your grants from a particular Contributor are 246 | reinstated on an ongoing basis if such Contributor notifies You of the 247 | non-compliance by some reasonable means, this is the first time You have 248 | received notice of non-compliance with this License from such 249 | Contributor, and You become compliant prior to 30 days after Your receipt 250 | of the notice. 251 | 252 | 5.2. If You initiate litigation against any entity by asserting a patent 253 | infringement claim (excluding declaratory judgment actions, 254 | counter-claims, and cross-claims) alleging that a Contributor Version 255 | directly or indirectly infringes any patent, then the rights granted to 256 | You by any and all Contributors for the Covered Software under Section 257 | 2.1 of this License shall terminate. 258 | 259 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user 260 | license agreements (excluding distributors and resellers) which have been 261 | validly granted by You or Your distributors under this License prior to 262 | termination shall survive termination. 263 | 264 | 6. Disclaimer of Warranty 265 | 266 | Covered Software is provided under this License on an "as is" basis, 267 | without warranty of any kind, either expressed, implied, or statutory, 268 | including, without limitation, warranties that the Covered Software is free 269 | of defects, merchantable, fit for a particular purpose or non-infringing. 270 | The entire risk as to the quality and performance of the Covered Software 271 | is with You. Should any Covered Software prove defective in any respect, 272 | You (not any Contributor) assume the cost of any necessary servicing, 273 | repair, or correction. This disclaimer of warranty constitutes an essential 274 | part of this License. No use of any Covered Software is authorized under 275 | this License except under this disclaimer. 276 | 277 | 7. Limitation of Liability 278 | 279 | Under no circumstances and under no legal theory, whether tort (including 280 | negligence), contract, or otherwise, shall any Contributor, or anyone who 281 | distributes Covered Software as permitted above, be liable to You for any 282 | direct, indirect, special, incidental, or consequential damages of any 283 | character including, without limitation, damages for lost profits, loss of 284 | goodwill, work stoppage, computer failure or malfunction, or any and all 285 | other commercial damages or losses, even if such party shall have been 286 | informed of the possibility of such damages. This limitation of liability 287 | shall not apply to liability for death or personal injury resulting from 288 | such party's negligence to the extent applicable law prohibits such 289 | limitation. Some jurisdictions do not allow the exclusion or limitation of 290 | incidental or consequential damages, so this exclusion and limitation may 291 | not apply to You. 292 | 293 | 8. Litigation 294 | 295 | Any litigation relating to this License may be brought only in the courts 296 | of a jurisdiction where the defendant maintains its principal place of 297 | business and such litigation shall be governed by laws of that 298 | jurisdiction, without reference to its conflict-of-law provisions. Nothing 299 | in this Section shall prevent a party's ability to bring cross-claims or 300 | counter-claims. 301 | 302 | 9. Miscellaneous 303 | 304 | This License represents the complete agreement concerning the subject 305 | matter hereof. If any provision of this License is held to be 306 | unenforceable, such provision shall be reformed only to the extent 307 | necessary to make it enforceable. Any law or regulation which provides that 308 | the language of a contract shall be construed against the drafter shall not 309 | be used to construe this License against a Contributor. 310 | 311 | 312 | 10. Versions of the License 313 | 314 | 10.1. New Versions 315 | 316 | Mozilla Foundation is the license steward. Except as provided in Section 317 | 10.3, no one other than the license steward has the right to modify or 318 | publish new versions of this License. Each version will be given a 319 | distinguishing version number. 320 | 321 | 10.2. Effect of New Versions 322 | 323 | You may distribute the Covered Software under the terms of the version 324 | of the License under which You originally received the Covered Software, 325 | or under the terms of any subsequent version published by the license 326 | steward. 327 | 328 | 10.3. Modified Versions 329 | 330 | If you create software not governed by this License, and you want to 331 | create a new license for such software, you may create and use a 332 | modified version of this License if you rename the license and remove 333 | any references to the name of the license steward (except to note that 334 | such modified license differs from this License). 335 | 336 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 337 | Licenses If You choose to distribute Source Code Form that is 338 | Incompatible With Secondary Licenses under the terms of this version of 339 | the License, the notice described in Exhibit B of this License must be 340 | attached. 341 | 342 | Exhibit A - Source Code Form License Notice 343 | 344 | This Source Code Form is subject to the 345 | terms of the Mozilla Public License, v. 346 | 2.0. If a copy of the MPL was not 347 | distributed with this file, You can 348 | obtain one at 349 | http://mozilla.org/MPL/2.0/. 350 | 351 | If it is not possible or desirable to put the notice in a particular file, 352 | then You may include the notice in a location (such as a LICENSE file in a 353 | relevant directory) where a recipient would be likely to look for such a 354 | notice. 355 | 356 | You may add additional accurate notices of copyright ownership. 357 | 358 | Exhibit B - "Incompatible With Secondary Licenses" Notice 359 | 360 | This Source Code Form is "Incompatible 361 | With Secondary Licenses", as defined by 362 | the Mozilla Public License, v. 2.0. 363 | 364 | -------------------------------------------------------------------------------- /DLL/DWScriptExpert.dproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {1CC323CD-87F2-4CC5-95A1-F984296F47E1} 4 | DWScriptExpert.dpr 5 | True 6 | Release 7 | 1 8 | Library 9 | None 10 | 16.1 11 | Win32 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Cfg_1 29 | true 30 | true 31 | 32 | 33 | true 34 | Base 35 | true 36 | 37 | 38 | true 39 | Cfg_2 40 | true 41 | true 42 | 43 | 44 | DWScriptExpert 45 | true 46 | None 47 | ..\DCU 48 | ..\Binaries 49 | designide;rtl;$(DCC_UsePackage) 50 | false 51 | 00438000 52 | 1031 53 | false 54 | false 55 | false 56 | false 57 | true 58 | System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;System.Win;$(DCC_Namespace) 59 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 60 | 61 | 62 | 1033 63 | true 64 | Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 65 | 66 | 67 | 0 68 | 0 69 | RELEASE;$(DCC_Define) 70 | false 71 | 72 | 73 | true 74 | 1033 75 | 76 | 77 | ..\DCU 78 | true 79 | true 80 | ..\Binaries 81 | DEBUG;$(DCC_Define) 82 | false 83 | 3 84 | 85 | 86 | true 87 | 1033 88 | 89 | 90 | 91 | MainSource 92 | 93 | 94 | Cfg_2 95 | Base 96 | 97 | 98 | Base 99 | 100 | 101 | Cfg_1 102 | Base 103 | 104 | 105 | 106 | Delphi.Personality.12 107 | 108 | 109 | 110 | 111 | DWScriptExpert.dpr 112 | 113 | 114 | 115 | False 116 | True 117 | False 118 | 119 | 120 | 121 | 122 | DWScriptExpert.dll 123 | true 124 | 125 | 126 | 127 | 128 | true 129 | 130 | 131 | true 132 | 133 | 134 | 135 | 136 | 1 137 | .dylib 138 | 139 | 140 | 0 141 | .bpl 142 | 143 | 144 | 1 145 | .dylib 146 | 147 | 148 | 1 149 | .dylib 150 | 151 | 152 | 153 | 154 | 1 155 | .dylib 156 | 157 | 158 | 0 159 | .dll;.bpl 160 | 161 | 162 | 163 | 164 | 1 165 | 166 | 167 | 1 168 | 169 | 170 | 171 | 172 | 173 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 174 | 1 175 | 176 | 177 | 178 | 179 | res\drawable-normal 180 | 1 181 | 182 | 183 | 184 | 185 | library\lib\x86 186 | 1 187 | 188 | 189 | 190 | 191 | 1 192 | 193 | 194 | 1 195 | 196 | 197 | 198 | 199 | 200 | library\lib\armeabi-v7a 201 | 1 202 | 203 | 204 | 205 | 206 | 1 207 | 208 | 209 | 1 210 | 211 | 212 | 213 | 214 | res\drawable-xlarge 215 | 1 216 | 217 | 218 | 219 | 220 | res\drawable-xhdpi 221 | 1 222 | 223 | 224 | 225 | 226 | 1 227 | 228 | 229 | 1 230 | 231 | 232 | 233 | 234 | res\drawable-xxhdpi 235 | 1 236 | 237 | 238 | 239 | 240 | library\lib\mips 241 | 1 242 | 243 | 244 | 245 | 246 | res\drawable 247 | 1 248 | 249 | 250 | 251 | 252 | 1 253 | 254 | 255 | 1 256 | 257 | 258 | 0 259 | 260 | 261 | 262 | 263 | 1 264 | .framework 265 | 266 | 267 | 0 268 | 269 | 270 | 271 | 272 | res\drawable-small 273 | 1 274 | 275 | 276 | 277 | 278 | 279 | 1 280 | 281 | 282 | Contents\MacOS 283 | 0 284 | 285 | 286 | 287 | 288 | classes 289 | 1 290 | 291 | 292 | 293 | 294 | 295 | 1 296 | 297 | 298 | 1 299 | 300 | 301 | 302 | 303 | res\drawable 304 | 1 305 | 306 | 307 | 308 | 309 | Contents\Resources 310 | 1 311 | 312 | 313 | 314 | 315 | 316 | 1 317 | 318 | 319 | 1 320 | 321 | 322 | 323 | 324 | 1 325 | 326 | 327 | library\lib\armeabi-v7a 328 | 1 329 | 330 | 331 | 0 332 | 333 | 334 | 1 335 | 336 | 337 | 1 338 | 339 | 340 | 341 | 342 | library\lib\armeabi 343 | 1 344 | 345 | 346 | 347 | 348 | res\drawable-large 349 | 1 350 | 351 | 352 | 353 | 354 | 0 355 | 356 | 357 | 0 358 | 359 | 360 | 0 361 | 362 | 363 | 0 364 | 365 | 366 | 0 367 | 368 | 369 | 370 | 371 | 1 372 | 373 | 374 | 1 375 | 376 | 377 | 378 | 379 | res\drawable-ldpi 380 | 1 381 | 382 | 383 | 384 | 385 | res\values 386 | 1 387 | 388 | 389 | 390 | 391 | 1 392 | 393 | 394 | 1 395 | 396 | 397 | 398 | 399 | res\drawable-mdpi 400 | 1 401 | 402 | 403 | 404 | 405 | res\drawable-hdpi 406 | 1 407 | 408 | 409 | 410 | 411 | 1 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 12 423 | 424 | 425 | 426 | 427 | 428 | -------------------------------------------------------------------------------- /Source/DWScriptExpertAbout.dfm: -------------------------------------------------------------------------------- 1 | object FormAbout: TFormAbout 2 | Left = 0 3 | Top = 0 4 | BorderStyle = bsDialog 5 | Caption = 'About' 6 | ClientHeight = 193 7 | ClientWidth = 214 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | Font.Style = [] 14 | OldCreateOrder = False 15 | Position = poScreenCenter 16 | DesignSize = ( 17 | 214 18 | 193) 19 | PixelsPerInch = 96 20 | TextHeight = 13 21 | object Image: TImage 22 | Left = 8 23 | Top = 8 24 | Width = 200 25 | Height = 64 26 | Picture.Data = { 27 | 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000C80000 28 | 004008060000005FBB382B00000006624B474400FF00FF00FFA0BDA793000000 29 | 09704859730000159D0000159D01A079359C0000000774494D4507DF051F0E25 30 | 1B872EF8E2000030874944415478DAED5D077C14D5D63FB3B33DD98484F44E2A 31 | 25D40448A8C18AFAAC4F7D0A562C3CF5A9CF024851ACD81B55BAF200E5D9D107 32 | 76C0674191167A539122881042CAD6D9F9FE67663704C866679345C2F73CFC2E 33 | 99D999B973EEBDE77FCA6D23883D9F14C87D2482640F8589641274F823120982 34 | 8CFF90248948E725639C2C7D7B8F14AE17854262F1183D79DD6692BD9AEEF74A 35 | 1ECA2AEC237B3C827DD7BF2FF3B6BB75296D9A5616669E1E24E987C748ECFEB0 36 | 8124BB490B6FB257A284F4B6648A8C73EC7CE3324FFB5B97D0C66903C2CB57D1 37 | 1892563E4E62CFC7F5E4AE469D696BB282E281A4D31BDCD5470E397F9E7789B6 38 | 77953C4DD2F21147CFBB8F3591E434E3D0423A6307C86507C85067C852164A1F 39 | 07396A836BE049D6E35C50E44B10C0A0E0C6F97E5CFB15C71538DE0C39DC89E3 40 | 6DE475AD23D96D2759E7229DE890568E731FC343E9F3247D7B5F83FC0962D1E8 41 | C1C86C28E90CFC92E6D62DC0405E3509480AEADC68D543A8E42338AF05B307F0 42 | DB1114B00205A8C66F074830EC97563DF96B585BF9F886281A35103C8D463935 43 | 69022F043139ABBD149F92B5F0F0A1DFA7EC9C77A15BCB7321F355FC5012EA64 44 | 2C5AA21D789383563040141D9BAC4BCD295CEDACAD7A78DB6BE71F0E2B3FA52F 45 | 4058EE457D3DDC8AC8311A75D69D74A6A07CB1E814F63807424BFF75BB5D8F6C 46 | 9C5AE66CF43DDD1F2669C5C3F5EA615457F27ABAE0B01FEAA198046321D0063C 47 | 188F2641EF4B8AF2654DACBE583992B9724801735D4293793971937B0F400EB7 48 | 4124D792A77635799D3B90CF1669F5B37B1A2D1600F2139913B3647D6438EB59 49 | 619AE47AC7FE02287FBDC0BDC705669D2800C0E23A421EFB61929D3F42297C82 50 | 8A592CAD7CF2405DE5953C092D33B2790DDF75D895B2357D01692D27788D888C 51 | A4FC821CBBD3E9FACBFAC9BDBE0867ED883D1E27E9FB3110C4D11FA3F1CF912D 52 | 296AC36B201D2C7461A776B072D2B4F249BD86E60E594ADB67958587AF6208EE 53 | 0F0F83AF914FE16C841C91199C2F34A9C56AA276ED0BC8EDF6CC73B93C376D9A 54 | DAC719F45DB7C202AC7C700814C4F55096B9A4B725CBC66814100644E70303E9 55 | 4E7C59506A48D17B55D0305854F0540A9EDA7DE4A9DC49926331DEFFA6B4EA19 56 | 052C05433EA32DB3CE52738299FF95227292649D212C15DC2C02E382A75A06D3 57 | 70FB6A56E29797C896BE405A3AB4D9DA5BEC726F178AC8FA8F6C6C9DA2F51928 58 | 29EAD4310FD644BE67ED849E2F85BBB862DF691154B3A39A22F349162DA4ADF1 59 | D9FDF35241412659ADE66DABBFDBD88196DF1056EB26F69A6222FB8E4FE4C8BC 60 | 7E10DAA07CA17E2835259E121363C9E3916E2B9F58F24A83F9F6780C4AE141E4 61 | FF9240AE83570218E32198F1648A1764639C66051176921CB2E03E24A467E76F 62 | 36992286001CDF16DCB28CB64CEFEF0348240022B400802824A892C9D18BA712 63 | 0EDA11174AF0824E76BD9E9B95B471D382A14D0A96C4AEF7DBC818FB896CCD28 64 | 09C595CCCB4D278BC534C7E572DFBAF195E05A51132F756ECCE82BC1CA0239AA 65 | 2369F5F3995820131362283535E180D3E93E7FC3945E3F8483AF3AFE8A46E7C1 66 | BA2F92A30B734FD4E00DF003C076E8904346A3BE0200B964DDA4D22F8FC9AF27 67 | 3C80EF46A2DCCF88E43A5C04EB3C0916A2988C31249B927CEDAD2D363C392410 68 | AA94E25A47537A5A1CD5D43A3A6C9DDE7FA372A5E501E458C695E47520A27156 69 | 9B4D86B792535A8FDF3EE792D5F9433EA5ADB3CE0E2937B1DBC8197254FB21D0 70 | 5A9A1192921247F17131E59224F5ABAA3E50F9D3AB1735BB5475C179D103FF22 71 | 43EC3570FD421210D6E74683810A3B647BE0D2FC1D1A7B66D8AA5CA9A7116792 72 | 3EE2033922DB124C99B0D76C34E801906C06EEC65ABB63C0D6E9FD7EABCBABFB 73 | A388351E82F5782A823C879F407E77C8A6383D195BE3A2E91403A37E39648A8E 74 | B6519BAC6480451EB7767CCFD1FC7B0B07C8B1C48118B47965627CD4233B5E3B 75 | F7C56BDF90E9B37FBF41BFBE7375A3CFE94A9E26EFF2116C4506C19D7C4D3644 76 | EBB5BA33D1D191A8B4140240121C0EE1C096E93DC35216B1CF2413D5FCBC42B6 77 | E5752491E3226DFCF8891BB4105A5B1475E3D7ACDE760FFDF79AB0489A78EE62 78 | A2034B6E2353C264D99CAC898FB8B8184A4B8D0740BC1FAC9D5052A741EAC0D1 79 | 7BB69EEC5BBE43F0DD4DB622A651DCC996455C8E56AD6C949599CC0DF1DCEA97 80 | 7B0CE7DF4F2B80F80B02DF9B52936316BB6A0F5DF6F3EB5738B43E0B8D9D48FA 81 | 563B11786AEA526502202937279D83CF0B36BED27B51B8CA013706AE86F4A11C 82 | DD29295470F8EB21233D896263A397C1FDBB146E564558F82A1E6320AF7B1A04 83 | F906324407BD1FA0A09CEC348A8A8A903D1EEF3FD74D2A19AFE4935A42D29EE5 84 | 70AF9E3193A76203E98CD972441B485C78E44CEDBB0A1F8515204A6794C6DE04 85 | A1D93DC70D17C6683420306CBDCA16691AB47662DF2D05372FA12D33028F0718 86 | BAFD93DCAB5E82008CDE24DB3AB4D55ABD06B80FD96D52F1577CB97C62E93FC3 87 | 5506B831D793216AA66CCD6A7264EAB36E95B06E9DED76D7CEAD33FA358F2758 88 | 5A721DB242D3AF0440DA92680DFE8C28525E5E3A99D01E3535B5795B67946DAF 89 | BBD6FDD168926ADE453E03E4882C1F3882D73BB72F27CE1B710DEADE407ABD48 90 | 7A9C8B7A1DE9B88B9747D7004EBE8F412A499C24F2B82572B93DCA3193A05100 91 | 030244E8366AAF6CCD4956FA998331AFC4CF3A329B8C644412D995F74159E67F 92 | FEAE686618C9CFB85739560BE24357F309D9E8D12829C9AD77988DBAB3B6CE3A 93 | EBE776B77E499BA6352C2442C98B242FBF87FBDBEFF49AD2C7CB1ADD1A51AF87 94 | 054923B3D9B805EE43DBB0F05E38122E5ECD8B14D1E61F646ADDE46CAC11166A 95 | DB368B5C4EF779EB27F7FA282CBC751A9E44A2817B36D5AED64084AA13A13C52 96 | 92E3E062B5E2F6FD71ED849E397C29EFC68F69DBEC7375D4FECEE7C914FD4F8A 97 | C8465E1AC001D9D241A650D78AB046A27CACA0743A9D03AEE437B8B612EFD983 98 | E35D10FC5AC6914FFE750E87CBE270BA32703D1BE0C874BBA56E4EA72BADAAAA 99 | 86ADBF9A7D236009089076B72E79DA68B20E6F8AA687C06F00433FE190DD1CAE 100 | 4D83EFAF1E40D2EB7464C28B13F06E96021B0AAA0BB745E1428307BBA3B6B6DD 101 | 969903766A79A6EDAD4B5F379B2D5785F20E54FA6158909870F09C7BFD229BD9 102 | 6A7B536F309E1B8EF2430971A03E351CBCB5B9E683A2A898B81F042178EF95FF 103 | FD2CB410CEDE5BA6F5DD997DC317F4E3AB6750DB5BBEB8D06CB12EF4DD15321F 104 | AAB2953F42BD4F8275FCC466B3783D1EC95B5BEB907F7AEDCC0691967FD332C1 105 | 6C310900906077B8744E9733D664300EACAAAABDB6AABAE6CCAA2A7B408F2620 106 | 4094AB5D5E31D95213AC7250EDAE9A8BEA1FF7D4D2E6BB9ADCE52996CD8B84F6 107 | 33047F9F3682F9156C36AB77D7BC73828E2AB7BD65096D9E0E572C66B43EA24F 108 | 914D0B0F0CECEA85971EEC37AA9CBE1CD7292C3CA3D245EBB9C3A374DC93D344 109 | 62E184C0B8A52583AA3BDCF60D210E691647A957FC9BF6BC792551D618B3AD43 110 | 91450E12A7F1FB6B6AEC2EEFD2C1357C9E7FCB97B475BA6AC1E3FEF25A8CBDD6 111 | 6E124CAD9DA4116C4A378CEC956B165F7E4C3B721B655EFB19FD32577BAF65C9 112 | 8855B4FCE96E75E7E73DBEDDBA66FDF6EB2B2A8E5C0F8B928F3C638E7F476080 113 | 34B542AFFE98F6BCAE5D09A60EC2FDF39BAD340352C6359F865489A1521AF2DF 114 | 1D86FC53AE789BF6BEF9D793C6E7A9A6E4CBB86751B3810E48A1CA5720CABAEE 115 | 33FA79CE5975E7D6F3DEECEF74BA2F04BE87C0FA2940090810DD19F3C8FBC5E0 116 | 633234F67E955C9108D03EBE32E04B7503F0DC92C101CF4F36E9CE980BBEAF09 117 | 992F5D7F3CB7EC9AE39EC16F4BAE212D74AACBFD27359DD2A0A077FB14B4E9DC 118 | 37058B499F05F7746CADC379BDE4F1524C4C000B0290B4C29F44C691200BD5B8 119 | 83BB0C1D68789906CC275A32880882402C08FEBFA408077794DF81B402F7BE7F 120 | 0247035EE7E170D2C93CB986EE443A84344BC917024E1070E4C1D71E435A25CB 121 | E20241E729C0F161D8EF7DE4E56E3019111ED991F6926AAB33C1A70BE0D8ADE4 122 | BFC437065286FC965EE3E7AB187F98C9D9785739F59B85E0C848EE2F95F71989 123 | 63228138E0E649395B91EF01DC77EC5076D9BF915FC30A0279E4E3CFDF917EC0 124 | 73F3D5FBDFC0FD3EADE93BC67DCC2FFB505EDCE7ACF7BC3F5E0B674FE5E94EEE 125 | 13DAE02452DE90A5B4CD377FADCD0D5F94FDBAF7F7D916AB291300614C3C5BDF 126 | 828868A6E770CC5D98D548DCBDC33EE0036078AA0840480134241AFA0CFCF91C 127 | 6910EE7DBDA17BC4B2F904D4C5E190271F3E81FBC61C93C71973A370C3121CBE 128 | 8C6B7390270BCDC7481723B1A07F85F43D527F2416CCB5484FE2DE51810A8F3C 129 | A6E3CFB54825B86F4DBDDF63F16736120F66F1EC61EEC7E4CEFE21B86FB6D6CA 130 | 453EE7E10FCF8F9E8BE75E6DE4BEF6F8B318E93DDC7777BDDFAFF1F11796A92B 131 | FF0F88BB9926A28EC23A21540BE5DEB494B6CF2CA392616B23F6ED3BF0CF5631 132 | B64170BB3E289F58F2005F17D05811F8FB1E12479FEC60C392D00B4885486DC0 133 | F4CFB8A788540BC013FDBE83403F09CDCE5A7D28D21424B624B5486391562371 134 | B4C8F93E8DE737FA34FA0A2416EA5C5234B722E43FE15A1F1CB31978CE77CE00 135 | 7917C797E178AD8FAFE500716F68FD1938BE14A93BAE6FC7F5CB491534A6450C 136 | 683EC0EF3F933A898885BEBD2FBFF9F89DA70F3C4EAAC57AD157D6DE48E5B8BE 137 | 02D799EFEB7CE5DC240BC243822C73A437881B10E96F486FF99EE90A46EF87BA 138 | C9C0F110BE1F89EFB5E1B7FB71CDE57B86F963802F407A05EFA9C57BF8F9D087 139 | CFFFFF122B8A95A89BEA53F172D3C0B7C8F9D1E5CA71FECD5F66EAF5A269E32B 140 | BDB7F2B9E0D3AA3B9018BD97B3FB83DF9EC7F1BDA46A71D6B46C25B8CB6E03D2 141 | 13486C059E447A0D8947E7D85D61C1676DBD05E94724D6B22CD0B722B1B97ACA 142 | F73BBB1CA94823F0AE67F0AE59383E07E94C9C6FC1B9DDF72EF829F48EEF9DEC 143 | 6C9D0571E20531D370DF50DCC7793E8AC4D6AF23A9E0BEDAC72B5B40CEE71B52 144 | 2D0F8337C3C7CBF3BE323D03E19F262DBD86AF31A86E2455A0F7FBDE79B637AD 145 | 9759B7FB9B0938FE07A9A076FACACBE0EA0C3E22F11CBB983CD397BB9879BA34 146 | 77E34CF595F92B1F6F5C9675B87F9C0F845F93AA35FF2495B6A06E0A4F250389 147 | 57FC87B2B252E9BB67BB28E71D6EFB9A364CE9AD00240FE78C967B4875731820 148 | D3707C0B125B0E760DAE40BA0B89E73EB315F88454CDC8CF312858B3B28561C1 149 | F15B1D76A9D86A5C80F4195212520F7E37B115427EB86F02EEDB8DE39F91CEC7 150 | F911DF734B91982F7681C6FBF2E63C6E42E2EE885548DCB5C8823C8E54217CC0 151 | 77DF661F7F0F23BF4791DF7252AD5011CE37E19CA7625FECE3877C79BE4BAA30 152 | 47E29E4CFE11F7B58182075F0297CFE3BBEF775F1D70FE6B70EF85B86F328E6F 153 | C331D765962F9FCD383F0BE70C8C73701CEB6F08FCC6EFE571A39330C7E0B425 154 | B6F61ED453E5A966E478E246E586674DCFFEFA7738676BC0D6E41062F6AE0896 155 | CB4975053EF5FD652DFA190EBE17544D3D1CCF3D8BE73E242580A6FE3A2F39BD 156 | 3A259E7909D7EEC135D6BEEFFBDC26F6DDD99A3070BE255E5D483407D7AE576A 157 | 6AC03C9EAAC09D063CB8389054F78D41C296E75BDC57867BF877F6ED795A3583 158 | 5020B503E06D528373B6707D71EF57BEFC382F061C0782953EB7926D2A6B7E76 159 | 75D80D5B87F442FDD8C6D781C096A82E76C26F6CA938466230F22C5A9E9F958A 160 | EB05B8C63319D93AB0757DCEC71B07F283EAE5C9D6258EFE74AFEA13036401EA 161 | 698172D2827A06192073F197BB5F5E26D58DE00092B524C706AC8D5910BB22DD 162 | 40AA6BC282C56E0A5B97FF205D84C27CE0738D38667890546DDE17E94C528373 163 | F6CF95C01AF7B125688754426A10CE6ED4BDB8F6A2AF7256F9DEC73E6931CED9 164 | 7AFDDBC76F6FFCF68DAF17895D39F6EDD9F2F1F4D0EB1864B8C6DA9D8598AD04 165 | 7722B0057C08E903A47F912AD0BC18AB8B8FCF65480C4E5E53C180BFC9F71C97 166 | CDEABB3ED8DF5B85FCB9F78AE3AE6C5F7DB11BB78DD4F88BE31B8E2FD27CCF32 167 | 381728F5E5F5AE269D8EFBDC4B4959B0FF271D47AC785986B6A2AEF7B4149030 168 | 40382E48F79DF3CA341688BBC19C12A4E03A0B3207A6ACC919E9ACB539BEE040 169 | 974BC02E4F15A96E125B0316568F2F8FE93E1F9DB5290BF09B38E77BD8E7EC8E 170 | 63D6E02C90E7B1B6F7BD8F6308165076B916FB7A8C58A8D97AF4F2579CCF123D 171 | EB2F07D21C52DD4276A9584019E46C01C6730F92AFA3805D9E4C3ABA0AE84358 172 | BB2B3DCB063B719D770E18EB7B865DA9225F7E1C7F5C803CBEC53DDC35CB4066 173 | 4071EF17838CC1B68FD4809FADD82048FF2792EAC2B1A561F7EF373C9F84E719 174 | 90B7D29FEE5520E27AE1B5247D505FAE53CD8CC2505EC63CDAF6CB8948654164 175 | F21E1DF3E09E1D1E1B612120B1789E20FD3058F65DBB0D7FD817BF9CF4D222EF 176 | A7D7D9957BCE9CC76B9D74F2D783D5390B67CFD7D1A783EAE62F44F69C27547F 177 | E7CBE3EC798A5EF57E74949713BA987DE31E789FA08CA5A8EF06184408E0552E 178 | 5DD93C9D77A9FA2EBE07C53379970C721CA38DE036011DB1B42475AF97CAD4F7 179 | 94E13D4B079371C03C13909D887B7F51F228C57BBE55DF4367CD23014D165145 180 | 42F5EABA77FBDDD304D2795D3B765F5BD966CB71F578E6BC78EFE7830F887DE7 181 | 92F45F6D83917F52CB71B34ED46467C19BF9ECE80059438C4210098258FF1E0E 182 | 94D9A5BA997BA2D4DFE62ABBB2D4BFAF3EF985B22E8FFEF3D4C583F57E3BFE1E 183 | 11794A0146BC7503E683CF4114881A9A31700C3FC78151D76F2E79BF3CFAAEE3 184 | 79F1959B5D3776A9AE42B92BEAF378427E41DEFF27B54C0A8BA9F705B3ECB6D8 185 | FD9AFD7F817CE5E63A74FC2F95FB7F8904B1FB632279EDD1247B35812529AB83 186 | 10199354BD65E6D98EB4411FD1EEF903FF3066C5E2074D247B22B5AE29E1D9A6 187 | 399D07C8DB377E5F212D1F23A70FFE8876CD3B965FDE9F8964C94A5E8F454BC7 188 | 9225B2152564B477FE38F7A2EAF6B72EA58D413693ABDBB0A007EA59B247A19E 189 | 1B9CDA2A491E2AE876B6A03759A40D9FBC5E413F4E39369FA2D1682349DFD8BB 190 | 4C96484ACC68EFFAE9F5CBAADA0F5D461BA7F6D7C8DB13E0AD26206FF56A9412 191 | 33DB0BAD123224AFD77378F3F486A79D8B4563A038BC117FCC7A731606AF4482 192 | 1E2FD349A4D379A4158F9D10BF34B6395CA325168B46227ED0FD8344B3368064 193 | E48BAD93D257974FECD5FCE99A211284642409BA1B4967D434C826CBB290DFA9 194 | 97CB6034BDBA6E4ADF1703E489C8477E14795E81DA089AAFD1641532F23BEDD6 195 | 09E2C84D33CEF821E5EA8F68EFEB8D2B09B1F4053D397F7B04F99F8F7A6E707E 196 | 3B83B9A04B1FA3DE60DA5B71E8E05F7E99FF972375CFF79B65A2EAADBC322F4B 197 | 9D8ED6309045838932723BEE339AAD0F031C5F6A99DD2C9EFF9940FB3F7F0C32 198 | 7001E94CA6C69680328FE93985065B4C42ADD72BF55E3FA56F8323DF00C8A5E0 199 | F379D4A9E30FE8CD061864EE24720290955022BF93D7BD178A742F7EFF09E5E2 200 | CDE176D5F1D6E31192BE1FAB3973412C1EFD0B9993D3356D1C27F32E1F899490 201 | 1847FBF71F4CDBF3FAC03DC11F0A1FC182CC2153E2B5B221F85E4D4CBC1D4D4E 202 | 6E1645454556D7D63AF2B64CEFB7EFC43CC788D03ECF9029E15E591F6489A9EF 203 | 95B9795964369B7F2C9F5892D3F5AE15B47A7CF7C6F9E6DD2B05DD5CD99286F6 204 | 329DE8D822DF88080B65E770079BF0DBDA093D134FCCE381CDB2AD5D4163E596 205 | BD326566A5F1EE1C156B2794C49206128B1EBC0435F5AE6CCD6898B77A24E05F 206 | 870E79A413C55D5EAFB77DF9C4D28601D265580499E32A6573B2A86EB47912A9 207 | C1CD09D5CD3D05C9554952ED21F2D46C226FCD5469D5F3CA02AE504012F29A74 208 | 5E629990104B070E1CCADD35EFDC1D27B7F4C792D87DEC0808F253B221863401 209 | C4EBA5CC8C648A8D8DB23B1CAE819BA6F6F9B2C17C8B475F08E15D48FA280D79 210 | CA949E96A02C333D78F048CA2F73CF0ABA65AA5834EA0B32C60D902DC90D6E73 211 | C36B1112135B5352526B06F55C00EFDAB4C19FD0EE79E71CDD43ABDBF067645B 212 | DB61CAAE8301CAAEEC30D2BA15A5A6C693C3E12ED93CADCF770179EA310E4232 213 | 8A797B830C317F93AD6941B7E0E10D2CDAF1125FB767B6C7230DDD38A5F7091B 214 | D689A5CF81DFFBE1BE8DBB5A36A7CCA796B0212193A706B6E6F74D82D7751BB9 215 | 6A9709A608F26800C9E90590E207FF46C6D66FC8A604D20A90B4D404F01BE3F0 216 | 78BC7F85E035B82B89D8E5DE423922F323E49D1A7C1F2899625AD928333399D7 217 | 3A5FBD7E72AF3782F2DD6DA44CB61C9275D6807C737E31AD22C9E9745DB4614A 218 | 9F0F4EC8A368647732C67F1F08642A6F1062B391F2F232B8ECE3D64D2A1DCD2B 219 | F176FEEB2C0A44B04C87C89A15232BCA21709DB262E03DC2920162B75BBA0975 220 | 392B609EDD1F826045EABD86A859A4B75D4B2D827C1B12BA2B49F054AD10487E 221 | C66691BFA8F86284326C917DDD22FA71CEF9273E755A01A4FBD8F351E1FF8166 222 | 22AD0049498E67CDEC044006974FECF97683F9761D1645C6D80F6145FA065B1E 223 | AA6C9466D453FB766D789DFA14B819B7675E07219CD3B010A27E2F50B7F7290C 224 | B86185BA734A0A994C465AB3608948FB1F68100162F7476A645BBEB5314DCF82 225 | 5CD8219B7704590557ADA8D1FAECF1581E79AAB6C8D19D84608A41DD3D319B77 226 | 93A9F048D205EB26967E1BACFE757D5E892143C4BF94F8466DB0163040AAB220 227 | 786B49071B1A1D21CEF97DD1CD93F8B776B72CA54DD3CB8EBDFBB40248F1837D 228 | E006FD57B6F064602D0091018E580689DBE5F2DCB67E7269C01D08A1495F916D 229 | 1D866A593FCDC2D2B1630EE9F5FA15AB5FEED1A3C1FC7CDBFA43F34F2743F4CD 230 | CA86690104DB6A31536E6E1A5BA72F113BF42FB8E54BDA32FDE8EE2C705748FA 231 | 6E14EF043F8F22DA0C92951D68029559752B5BB78EDA5F5D6DEFB67546FFBD81 232 | CB3CF226128CD3E5A87642635B9F32AE0D500A85ED79F744EF1ABBDD3570CBF4 233 | BEFB1BAB23FFB8946EC06B8843F45CEFD7076FE13F9A945DE1DDB131111BB232 234 | 5206AD78A96453FE8D9FD0D6D9E7D4DD71BA0164002CC8174AB0AB112029C98A 235 | 6FCF00B90BEED02B01F3EE7AFF203932773600680CBE59B3979766F2A66D3FDA 236 | ED8EB24D53FBEE0A9CEFF0CD14D9A640D64707E419F940A893C8E972DFB97E52 237 | E9C48079757FE44258BA85326FDBD9481CC2FB65E564A7D638DD9E41EB27962E 238 | 0C985FB7E1AF9129F13A6567F92056293EBE95127B4992F75D80F8322DED557F 239 | 36068E6F27751267F040EF0F2781E2E3A29DAD6323FFB671F58A85F4FDFD72DE 240 | 4D4B69DBCCB2D30E20970220EF6807086290B44414BE950B41E52DF0C9E704CC 241 | BBDB882432C6EC80A6B7060B56953824268A376DAB00F02E5F37A9A4C1957062 242 | F1984EE4757F021726B1B1FCB2B292A91584DA6177E56D9CDA677BA0FBC4E2B1 243 | D1A48FAC8005151A2B3F77C776EE94C77B933DB2767CCF871BCCABDF3403556D 244 | FD866CF9C5C1F60853764FCC49A3285B84847ABC07F53821940D32EACD9FE365 245 | 07C3C1DF65A8C316B5FF28D7196F9F1A1565BD6DDDA4DEAF5C37E320CDB9B9F5 246 | 690690A2D1574388E7871283B4C94AA556AD229D38BE129A6F61A3F9178F2E97 247 | 6D851DB5744DF24E7F1D0B73C9ED9186964FE839ADC1FCBA8DB801023D4D8EC8 248 | 3104E2971BA663A1B2DFDA16F0D8136E5125EF2B75425E25CF12B97E33C38270 249 | 0C7686FAED8C00E506800B10A85BADE677AAAA6AAED93E6B80FDC4BA1CD50E8A 250 | 603162A3CC60A18128EA281FF921FE70D7D4383A6F9DD16F53139A4FCDEB8CD7 251 | F5A2287443DCF577B8AA373A9CAEBA7A3895C46E2497B36D41A65BA7A36BCB27 252 | F65AC08BA64E2F80148FBE9B8CAD5F52B6CCD7380E5250C0826271381CAEF337 253 | 4DEDB3A4C17CFD23CADD468EA5C8EC8765314253FE1CA80328E37F3F74E4BEDD 254 | 73CF3E669051FCCB3281F67CF81259D3EE52BE7DD160A3C8CAF8071A857BC466 255 | BA5CEEDBE1AE059CC52A761FAB033046C9E6A4C71ADB16D4DF6D8CB6DAEC76BB 256 | CF5937A9D7092E20DCAB0B608DDF5477706F9C22232D70295358880F20F04F68 257 | 72FB9D319FA42F06D1594FECA0CF46E750FECDCBE26A6AECF7DA1DEEDB6B6B6A 258 | A35DEE53BBC8F2A87B9AB6A9A6A6F6ACCDD3FAED3DBD005234662699E387C8C6 259 | 78D23A42CB420C6D5563B73B3B6F9ED67747E3F93FD89E8CD11B944E000DD324 260 | 386E68D5CAB614C27D09E29BBAD5703C7641EE43B170AFDE9323F3FB92686EF0 261 | 79BF0B98101FC31F9EB9A57C62C98CA075D075D8403932E7030877A3D34EAC16 262 | 93F2911DF0565C3EB1746503F9DC4BE6A4E701B646DFC74293101FAB74F122FE 263 | 980C1EEFD0327B2018E50E5942B06C75E75DEFFEFEDC8A8AAA2B6A6BED3D6AED 264 | CE04DE4D1FAF16502F4A3DA91BFC9D9CBD9E8F2D2F513BD49BD164B867CDDAED 265 | 2F9D1600A91B7C2A1EF30D99534B6543E080B73EF1373478636598CEAA35E37B 266 | 6A0A0EC51E8F1E9223F362B400A4B5F2C195C48368CCC2C395D5FBFC5DBD62F1 267 | 43907E671B122DEBE5882C6BA01DCDD9C215C2BD02800F42102E866FFF7550FE 268 | BADE974796B4C5B2293EA731D7885DC082FC0CD6FAB70120C7744EA0CDCDE475 269 | F1C6D983C8D078B528D34B00E2D8D8288292E9032B1C94C75028E2BCB7A866F1 270 | E575E77F7D79B771D7AEDF3A5755D5B6ABAD75B403C03B2296EA883ACE70393D 271 | 647738017A771D6F27C3358B87C24A4D895F03F7B9EF6901103FC182C8149945 272 | B22E787CA798CBA848CACC5434E45AC41F5D1ACDBBE41992960FE7C98B33646B 273 | C64DCAB48B20C4DDB3F9F9E9E474BABB6E98D27BCD31F9158DBA18F1C77BCA14 274 | 8E060499F9E3710F1E99C6F17AC41E65DB67951D0C5A075DC70840D4E7886B06 275 | 3406101D1C69B670369BF57D2887BA4FCE2AD6CD75A0155CB5EF0090FC40D6CD 276 | 4F7ABD1E017A2AEFDEEE413E277558DCDF73E4A78E777CAF339B75568FC76BA9 277 | 3C526D13485702657786C7E319007734BBBAC64E00926261C2099408AB59E994 278 | 40BB169E360081E0F626D9F3956CE325F3C12B43F5C3632939895D03E94568D1 279 | 7B35BDA7C763179031E643D9C053991AB752FC0906DEF95DA713EE41FECA370C 280 | C5D26761ED863140669209EEA029B1C17CB8EB342141D1547CFC3E7CFBA0DF4D 281 | AE8B95BA0E7B528E2A1C4E3A7DA38336498843121363ECAB5FEE794CC022168D 282 | 4C259D65B7FA81CE463D3565A7F5B605595C870BA1642E6E52E33593FCD36EEA 283 | 53C255FF31A424C495C1F29E79B8A2EABC8ACAAA2C583846BBB1696F394AFC29 284 | 87EC6CA55D47B47880F83F170C819B40FA887FC8BC2DBF86EFF9B146F1C508EC 285 | 1A94C1355816F45DEC1A498E64F8E63FCAE64473D0FB459D12BC5A234C1FAE1D 286 | 5F7261D2958BE8C0D23B49FA6D07BB8307C8921E2707F808266B3DFE300F34BC 287 | 8C46BE03EED514AD7BD18A5D870F206BEAC788C50C81C743887BEF943AB0DB1D 288 | 5DB74CEF5F67E160890791DE3A4F19BC0C423CB72B3D3D91A7C00C419CA57973 289 | BD93490DCD5C287B7063C2FA0D3BCEAF385C753E94235F6CF24EFCEC9EF257C5 290 | CC66D3FB2D1E204CE2799F8BB4FF935D644D4FD6A2D999783A480E04D0A0175D 291 | 700D346DA1AEB81FCE5FA3C818F79E6C4E1E10ECABAB2C843C3110B1886B2DDE 292 | 31F0E99FE9A311596C85F211836C41801EF0CBADDC080C1093C90037A13A6BFB 293 | AC33347DBAA18ED71E8FD6207F6B63CA82BF1DC81F2185C11DB76E52AFD1B1E7 294 | BF4687165DCFDDE5FF2253EB6B82F506B215661E2323954F0F1402C44DEEDE3D 295 | 5994F4B7459494D09AD64CF07D1AAFEFAB3A9DDEC0FB000C2375CF849089DD53 296 | 1E088E88B0FCDCA20152F7D9E0A251831034CF965B75326A5D2CC5F14776762A 297 | F7E2CC2E9F583224E7C625B463F680A0CF893D1E87DB228D932DE923B4C421AA 298 | 9B954E1E49EABB796A1F65E309F0FB1202F4BBE5C8DC80BD6147BB4E690F5C97 299 | B490EBA668E47BB2ADFDC58D4D8DF14FB5819BF9DBEA977B241E7D76B40465A3 300 | 0B364191A94BE77CB676AB01908188937EFB79CE99A1B2FA8751FDE5E1BE0D36 301 | 78F3BEC743CD87BD0F0608DAC8D3A201C224F67A414FF67DEF9325E97CADE31F 302 | 4C390087CD16C1D3377A6C98DC6B4548EFEC7AFF55B22DFF35122382FAB37EBC 303 | C222947B6A7EBD54E7DC9F875F17913553271B5A05E497A7CBA721FE707BBC2F 304 | AC9B5412F2523780F04A32A72C908D8D5B5406097FB60C8C8E910F97CF42A0FB 305 | 246297EB651BEF11DEF8179758C970B00A70CCAAACACFE3BC011D6EFB19F74CA 306 | 1920E8D2AE7B8B74464D5363FCC45F79E2D9D55151112D77A0F0E864BF51BCED 307 | CF3B1058B3960F40FA3FF2C981251AF67B49F29EE372BB2BB74ED7FEFD3EB1CB 308 | 7D1D28220D3E7E426A484C4B76129C07887B860205E74C6AD769823207ABA6C6 309 | DE7DCBF47E217FE75C2C7DD64C5E8F5DF930A6966FACB325731FF2089E5ABDCC 310 | 9F7DD330BD842D5C6C6C14BB5777C30A4F0CFE929643BAFEB3C9BBEC46D2178F 311 | 2AF05A323790DE266A55AE7E170B16446EB900C93B9B28E162588FDD9B647352 312 | 2E99E2353DC70DCBE0E0C53D38BE07EECB4B4D7A7FF747D6C891799D435E32CA 313 | 26254897A33FFE409C54B366FC1B91EA565B21F0E6773D7B3CFAB56C6DD34BFB 314 | 179CFC6509BC6CF7683DCAD4A9632E77441C74BBA58BD64F2EFDA6519E8A1F22 315 | E98747D5635277D46B2924767F68851CD9B6586B5B1E0DD28DF6160710B1680C 316 | 492B55B7512C1EF53E09C68BD4CF07EB833E5B7F31138EB773EF15B47348CB82 317 | EB2C57D76113E5E88E77040BD49B423CFED1BE5D162F3C7A1B9AF9F2A6E60380 318 | DC4FA6C467352D970E81942930568B32051FD66EFB2FBFECEB74F0DD8BECC19E 319 | 832CA1A1741924C85F4B2B1E55E68D40D190B442FB1AF09341F042E6C0E5BD36 320 | 508FE2F1C41D27D96DD200145D798B02C8D111F3A7108C5742F3EB6E9323B2E0 321 | 4447085A0AC6DDAEEC335BCC26EEB71F513EB1F4998E777C4BEB269586CE4BB7 322 | 1103C992BA589D4715BE8D07D4A91B31CA141397CB7D23787BB5C9F5D5FDA1CE 323 | B2B1F51A0A61EA8D16AA17DCF3F4927700E2BF1EBF46E5045EFA4C20AADDF357 324 | B8326FC9FA886982BB720280B13E6C4C3583009057C99C7C7D63CB04EA13BBE8 325 | 3CBE050F646E9301F2DB6F877277CF0F1F40C4E2B130D18F00242F1BC8F9EB4C 326 | 68EE6B15CB21065EA67A3C315FBC2414055B05D74A594D9772D547B4F78DA6CD 327 | 1B822B23C3CDD2E6E36B249E699B9F9B41111166974792BAAF9B585ADE24DE4A 328 | 9E22721C48264BF212B8A005E15CACC720E66FC37390EA7279AEDD30A5D7DCA0 329 | FCF4869B68DFFF37D992FC067157BCD7B9975C15B3C51D6F3CE23EB0D22D7647 330 | FBAE78246C3C6AAAA3BA31B491ABA1ECBA681D22E0B52F69A9CAD8CF0D2101A4 331 | DE2C513A78B0A260E7BFCED9DAEC42C06A907D2F496B5EE00FCF6791D7BE18EE 332 | 545B051C1ABA59FDC423BE05F9994A08E07038D3374FEBBBBBFDDFBFA28DAFF4 333 | 099DA7C47492F6EFE2EED04F655BDBB3B4FBF8C189C393CE9D94AED355087E2F 334 | A83C52B36F57133F0C2A168D30933E7AA66C4E1914CECD11D425C0A94A9DFEF4 335 | D35EDBE1859704FDB08DD81B06DFBEEF4A006401D5CD5EF692E03EBC931CFB87 336 | 4A3F3CFEB172DF1F0494BACD2E4A9E8923D7EFBBC8D6D62C37B2E1457DE2A9FD 337 | 168B91AD676AC81684A76773002379BDE76F98DC6B71FBBF7F0D21EC1D1AF3C7 338 | F9A5E02196640F2FC97C81F411245B327C3147F0C2D49BC7AF0C0EC2AF1F0AB7 339 | 65DAF1F37A9A54C94563869025656663DDB5A1903A9DDA4639D929E4F1785FDB 340 | BBF7F79B0FBC7D41B3E6788B450FDC2B47E63F1F8A32094691DCC66D78CD0DAD 341 | 8325EEE4FFF679A37C340810523F2B29D590E03AB494BCEE61E4AEDC20AD7AA6 342 | 2E9EF1C77CE124FF941CB57E464E842CDD2E47B517B42C84E3F1A9827C8E0FDD 343 | 9F022097860C10C587862B033F7A2904511979D3F59944DEAFEE08BD20DD1F2C 344 | 228F73202AF16AD25B3A107C44C54F947D7B1C05E54505479BAC6465CC0371C7 345 | 02BBDD71C3D619658EF054F4B8D6A8DCDF656BBAA6E9EFC18867EFB6013862A2 346 | 6D9247F2DE07DFFEE566F3D8E5DE32B4DF3B007193A7561C4FCAF492B40472BA 347 | 3CA3D64F2E7D52131F8100A210BB7F320345123CB5EF41A3BF4D8E831F4BEBA7 348 | 1CAA7B1E2EA3B4FC81E6D545E9F3BCB50F492B5596010EA0441E4BD61C13E222 349 | D22253EC85C072CA689F1BD64D2C99133240FC643219BD92E479CEF5E9D59AE1 350 | AFB850B2AB23793DFD515B65A8B87432442728A0E05843A3D5A8AB761E4F484F 351 | 547AAEE0B26CACAD75956E9BD9EF48E73B9713345FF32ABBC763A8EC430299E2 352 | D6C8D68C4E47BF98D07462E552D881377B100FBBDC122C70F09D4182F2D97578 353 | 24195BAD93AD5959E1B0725CA7195CA73136AAA971666F99DEF7274D7C340A90 354 | BADCC1A287633AA7E0AED84DCE03CB70FC062CCAA7C7E4E59B591D523DF47C1C 355 | 5643FD3E2C628F2EE475BC80F7F545DBE9B5ED77E6A5E4E4385F0C2BAFA9AEB5 356 | F7DB3EA3ACAAC9005149E681B1DFC975701D0EA1626548B8CC92A4833488A86D 357 | D494108FDFA2EB3430EFC8215AE0E8DA48755D82F7C9076A482E10F708A170FB 358 | F7ED3B9CB3EFDFE7D6E40E594ADB7D9FF76D2E89C56304D2999F42103C5CE1B9 359 | 19E45F3D98A3CE12FD65F5874B7268C788E6B9573D2014DF8F614DB9508E2ABC 360 | 301C65E641B2B66DB348D4E97681E7DCC387AB5C5AD69E6B03487D1294CE0FC4 361 | 2844EEC32E921C6F93202E443D7F0A2B50498291DD33043106998CB1247D73D7 362 | 314282D85520F711DE8D45503E23C07F457337B8712371CC4B0DE0AAA7ABF2A6 363 | 41BED4D02199B74B925C2EF7651BA6F45ED8F6D6FF863E927E623975244876EE 364 | B5500BED4F82FFAF4E99B0272B7FF554676E35BA51C7130B1A0791BCDF555C5C 365 | 348F96AFABAD759CBD7546FFFDF9377F495B67681F310FDEE893889CFB07CAE6 366 | C4C5A480B9E9E4774DB9EBD4EB95DE299F58FAD7E357D53599CFAEC36EA4C8EC 367 | 598DED9CA295CC66933246E3727966C307BF65C3945E9ABAF04207889F7CB202 368 | F911DC55CA6C045899DD10F20D50AA3FE1EF8F38FF1DD70F41887C0BD8C90859 369 | E2659FB190AD0CA40E90B3425C8852D6B71810D2F242300DBD8F2C863CEEC123 370 | E7DCBDEB767B9E44E830AADB3F57D0AA97BA870120FE4236CE46B31AED6861D4 371 | 692469A90932102F20E6F80C05BA71E32B7D7607EBA76F2A895DEE6B4B11199F 372 | C30D4C696E572A3702AF7946003868FDE4DEAF372BB3FA3CF2CEEF86C8C370B3 373 | 9A152B71FDB255E67524503CD7EEDF7F70EEFE372FD0C6439301529F7C6061C1 374 | F6BAD4BFAA4BA64AB2CC1F3B56CB2793AA78FD0A58E9C56319AE73D3B56D0BC5 375 | E0E00E095EFC86324F445CC8DF9EA4D4AB3FA23DAF0F0C17404E3EB18FE8D7C0 376 | 70515018CF7347AA8E8CD83967E049DD1D19DA399A4CB16FCBE6B4339BD3DDCB 377 | 568F1BC26C32D2FAF53F993D5F5CE50C2B9FC563CA655BFB8ECD51465CC7EDDB 378 | 65B3D054C07A9C0B61D13CC9333C00F9E3C8EFF2F27C338341E42EDDD7EC76C7 379 | 6DDB6696D9F36F5E064F44FD74448B0708C71A3C329E96168F0259B9A7EA1758 380 | 8DDBE0232EEA72D777F4DB818A666F20108CA0A1C7CBB6FC3BB54C770944BC8C 381 | 9357A9A1615641F08AB2AEFB9CC239751CED388A2CE94FA8D34E9A0612F8DFCA 382 | FC2BD4F10F4EA7E72F9BA6F6DEAFF9590520BF5E2E5B52DE6CE9006199E24150 383 | EE8C40CCE542795F85CB3BB4C17B5B1A4018D99C782D34F749730F15AF0A04FD 384 | 040D37CFE9744FDA3CADEFBEA60E028642BC1795B47C1877A55E45B682D910BE 385 | A0AB0C0351DDEE894EF703EB27973E1D765E7B3C9A8BC0749B6C4E6E929BC5EE 386 | 064FC167A191BCDEF96BC7F70C79B111DCD19EB235F31BD918AB3BD5FB5C1D4F 387 | EAB204D5458F4739B93D2067DBE0568DF34FF769C84D6F11005141A196C26C31 388 | 293B6844D92294497DA8E87D086A9F40032E5A3FB9177F91972E7A6E272DBC3F 389 | F872D17091D875442ADCACF5B225BD55537BDC32D2939425B00048CEC6577AFF 390 | 1856FE8A78504C3692A1D556F0D8A48AE1319ADC5C6509B0071A95D7D84FCCBD 391 | 69296D0F65B035E91C4364E7C18F08FAC891BCA182BFECA79AD875E4856DEC9E 392 | B3E560E50B999A0C703C054F64D71EC85DAFEB3F6F7003F2530E10AE3FEE39E1 393 | E0B555B44D19A461C0C0275C82869A8402BC73AA2B98096ED60639BAB07D53B4 394 | 332FC0E9D03E1B218C002B28773C5471A4E6F84D089ACFDF481116640A2CC82D 395 | 4D195567F78AB70942AC546BB73B7BC24A8734D150ECF9046575BB84764CE940 396 | 79B72C8B27AF7CFBE1C3D5B71EA9AA49719FC20DE13808E7E95131AA17C260F9 397 | D2E170DD004BA18CEFE4DFBC14F14659C0E70573EF713FEB22DB64CACDF0AFEB 398 | 32AB5316EA065FFE7D8B387160CDF3EC0D40AFF2D768709B8C06070051298ABA 399 | 1A80A212A0D800502C3D526D5FB4F3B533F95BE574FB1BB5F4C1075FD1AE300B 400 | 9456AA9BD3D375C43F0C7185130431142F4B56CA9E9810AB584568ACF11E8FF7 401 | BE0D537A855F628A9E45BD3A2ED147A6BD2B18429BFECE3CAA6E4794B2BC76ED 402 | 84926E4D65E378AB53326C4DCFDF7EAFB8B2A6A6B67F4D8D23096D9CC29FC6E3 403 | 0DE1704CC75A64ED1BC3F95DA6FAC4203740B6F406BD325D261A16DB6A31D7E2 404 | D22EC8D50A97CBF3D2A6A97D944DF4788C034A2078DD645EFDF67596C8B85BA0 405 | DE9AD5682A10D46F5FC9CAC88DE005282404417600E220AED7A2F2ED3A51B75F 406 | F62ADF943B8C0AAA4665ED733A5D07B74C7FFF57A2E7FF88AF3E368D0C03C4CC 407 | 2BEE1F6E898CE25133CD7E03F75E21F1CE251BD1484FC2229EB4CFD659FB3C61 408 | 4D68533CD46CB1F29760346B3C162CA3512FA07D76B8DDD238B8803B9ADB8950 409 | BF2788E9C65987F5E51B76743872B8BAADD3E52A824BD7D52BCBED20E8A9FC01 410 | 53BC97FCA0F14AF8EB95EBE2514E7E578D15ADA8D391C8406040A07E8DB012BC 411 | 49A0728C0480EC83D25D89F2AC80C5FEDEE572AFE3C9AB4D2987D07DD8669DC7 412 | 75C4CA23A8CD2581A783C1DF9324D9BF5D24CE6519CC4A4E97DB5B5151251F78 413 | EB8296B4D84C13194A1E27F7F231D4F7C1AD42F591C311A1D4156A007541BCF5 414 | 906BCBF4C0FBEE3697A2CF9E44959FDE41DDEE590911F25A822E6B3C86476E2F 415 | 89E07AB8364FEBE72ABCFD1B42BC1736DE8E9FECD8EDEE1522DC4D33C74DB576 416 | 97D5ED76B5D78BFA5C28CF5CF0920797944765E3C116CF9834A3242200C28979 417 | E515033C7CEE1074B40BE5DC8FDF79D49F77C55F05B9DBC4537900344765658D 418 | 63D7BCB3EB946EFA359F52A833A7FF0FFFDBCF81EA26B60C0000000049454E44 419 | AE426082} 420 | end 421 | object LabelTitle: TLabel 422 | Left = 8 423 | Top = 78 424 | Width = 154 425 | Height = 25 426 | Caption = 'DWScript Expert' 427 | Font.Charset = DEFAULT_CHARSET 428 | Font.Color = clWindowText 429 | Font.Height = -21 430 | Font.Name = 'Tahoma' 431 | Font.Style = [] 432 | ParentFont = False 433 | end 434 | object LabelCopyright: TLabel 435 | Left = 8 436 | Top = 106 437 | Width = 198 438 | Height = 13 439 | Caption = 'Copyright 2015-2016 Christian-W. Budde' 440 | end 441 | object LabelUses: TLabel 442 | Left = 8 443 | Top = 138 444 | Width = 201 445 | Height = 13 446 | Caption = '(uses DWScript, SynEdit, VirtualTreeView)' 447 | end 448 | object ButtonOK: TButton 449 | Left = 64 450 | Top = 160 451 | Width = 75 452 | Height = 25 453 | Anchors = [akLeft, akBottom] 454 | Caption = '&OK' 455 | Default = True 456 | ModalResult = 1 457 | TabOrder = 0 458 | end 459 | end 460 | -------------------------------------------------------------------------------- /Source/DWScriptExpertModule.pas: -------------------------------------------------------------------------------- 1 | unit DWScriptExpertModule; 2 | 3 | interface 4 | 5 | {$DEFINE UseCryptoModule} 6 | {$DEFINE UseClassesLib} 7 | {-$DEFINE UseGraphicLib} 8 | {-$DEFINE UseIndyLib} 9 | {-$DEFINE UseSymbolsLib} 10 | 11 | uses 12 | Windows, SysUtils, Classes, Controls, ToolsAPI, TypInfo, Dialogs, Forms, 13 | 14 | dwsComp, dwsExprs, dwsSymbols, dwsErrors, dwsSuggestions, dwsVCLGUIFunctions, 15 | dwsStrings, dwsUnitSymbols, dwsFunctions, dwsTokenizer, dwsDebugger, 16 | dwsRTTIConnector, dwsCOMConnector, 17 | {$IFDEF UseCryptoModule} 18 | dwsCryptoLibModule, 19 | {$ENDIF} 20 | {$IFDEF UseClassesLib} 21 | dwsClassesLibModule, 22 | dwsEncodingLibModule, 23 | {$ENDIF} 24 | {$IFDEF UseGraphicLib} 25 | dwsGraphicLibrary, 26 | {$ENDIF} 27 | {$IFDEF UseIndyLib} 28 | dwsIndyLibModule, 29 | {$ENDIF} 30 | {$IFDEF UseSymbolsLib} 31 | dwsSymbolsLibModule, 32 | {$ENDIF} 33 | DelphiAST, DelphiAST.Consts, DelphiAST.Classes, DelphiAST.Writer; 34 | 35 | type 36 | TDataModuleScript = class(TDataModule) 37 | DelphiWebScript: TDelphiWebScript; 38 | dwsDebugger: TdwsDebugger; 39 | dwsRTTIConnector: TdwsRTTIConnector; 40 | dwsGUIFunctions: TdwsGUIFunctions; 41 | dwsComConnector: TdwsComConnector; 42 | dwsUnitDelphiAST: TdwsUnit; 43 | dwsUnitInternal: TdwsUnit; 44 | dwsUnitEditor: TdwsUnit; 45 | dwsUnitHelp: TdwsUnit; 46 | procedure DataModuleCreate(Sender: TObject); 47 | procedure DataModuleDestroy(Sender: TObject); 48 | procedure dwsTSyntaxNodeMethodsGetAttributeCountEval(Info: TProgramInfo; ExtObject: TObject); 49 | procedure dwsTSyntaxNodeMethodsGetAttributeEval(Info: TProgramInfo; ExtObject: TObject); 50 | procedure dwsTSyntaxNodeMethodsGetAttributeKeyEval(Info: TProgramInfo; ExtObject: TObject); 51 | procedure dwsTSyntaxNodeMethodsGetChildCountEval(Info: TProgramInfo; ExtObject: TObject); 52 | procedure dwsTSyntaxNodeMethodsGetChildNodeEval(Info: TProgramInfo; ExtObject: TObject); 53 | procedure dwsTSyntaxNodeMethodsHasAttributeEval(Info: TProgramInfo; ExtObject: TObject); 54 | procedure dwsUnitDelphiASTClassesTCompoundSyntaxNodeMethodsGetEndColEval(Info: TProgramInfo; ExtObject: TObject); 55 | procedure dwsUnitDelphiASTClassesTCompoundSyntaxNodeMethodsGetEndLineEval(Info: TProgramInfo; ExtObject: TObject); 56 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetColEval(Info: TProgramInfo; ExtObject: TObject); 57 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetHasAttributesEval(Info: TProgramInfo; ExtObject: TObject); 58 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetHasChildrenEval(Info: TProgramInfo; ExtObject: TObject); 59 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetLineEval(Info: TProgramInfo; ExtObject: TObject); 60 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetTypeEval(Info: TProgramInfo; ExtObject: TObject); 61 | procedure dwsUnitDelphiASTFunctionsExportSyntaxTreeToXMLEval(info: TProgramInfo); 62 | procedure dwsUnitDelphiASTFunctionsGetAbstractSyntaxTreeEval(info: TProgramInfo); 63 | procedure dwsUnitDelphiASTFunctionsSyntaxNodeTypeToNameEval(info: TProgramInfo); 64 | procedure dwsUnitDelphiASTFunctionsSyntaxNodeTypeToStringEval(info: TProgramInfo); 65 | procedure dwsUnitHelpFunctionsGetIOTAHelpServicesEval(info: TProgramInfo); 66 | procedure dwsUnitInternalFunctionsWriteLnEval(info: TProgramInfo); 67 | procedure dwsUnitSimpleEditorFunctionsLocateTextEval(info: TProgramInfo); 68 | procedure dwsUnitSimpleEditorFunctionsSetCursorPositionEval(info: TProgramInfo); 69 | procedure dwsUnitEditorFunctionsCenterCursorEval(info: TProgramInfo); 70 | procedure dwsUnitEditorFunctionsPageDownEval(info: TProgramInfo); 71 | procedure dwsUnitEditorFunctionsPageUpEval(info: TProgramInfo); 72 | procedure dwsUnitEditorFunctionsGotoBookmarkEval(info: TProgramInfo); 73 | procedure dwsUnitEditorFunctionsReplaceAllEval(info: TProgramInfo); 74 | procedure dwsUnitEditorFunctionsMoveCursorEval(info: TProgramInfo); 75 | procedure dwsUnitEditorFunctionsSelectCurrentWordEval(info: TProgramInfo); 76 | procedure dwsUnitEditorFunctionsMoveOneWordLeftEval(info: TProgramInfo); 77 | procedure dwsUnitEditorFunctionsMoveOneWordRightEval(info: TProgramInfo); 78 | procedure dwsUnitEditorFunctionsInsertTextEval(info: TProgramInfo); 79 | procedure dwsUnitEditorClassesIOTAEditorServicesMethodsGetEditOptionsIDStringEval(Info: TProgramInfo; ExtObject: TObject); 80 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsCountEval(Info: TProgramInfo; ExtObject: TObject); 81 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsIndexEval(Info: TProgramInfo; ExtObject: TObject); 82 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsDeleteEditOptionsEval(Info: TProgramInfo; ExtObject: TObject); 83 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsAddEditOptionsEval(Info: TProgramInfo; ExtObject: TObject); 84 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsForFileEval(Info: TProgramInfo; ExtObject: TObject); 85 | procedure dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsEval(Info: TProgramInfo; ExtObject: TObject); 86 | procedure dwsUnitEditorClassesIOTAEditorServices60MethodsGetTopViewEval(Info: TProgramInfo; ExtObject: TObject); 87 | procedure dwsUnitEditorClassesIOTAEditorServices60MethodsGetTopBufferEval(Info: TProgramInfo; ExtObject: TObject); 88 | procedure dwsUnitEditorClassesIOTAEditorServices60MethodsGetKeyboardServicesEval(Info: TProgramInfo; ExtObject: TObject); 89 | procedure dwsUnitEditorClassesIOTAEditorServices60MethodsGetEditOptionsEval(Info: TProgramInfo; ExtObject: TObject); 90 | procedure dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetFileNameEval(Info: TProgramInfo; ExtObject: TObject); 91 | procedure dwsUnitDelphiASTClassesTValuedSyntaxNodeMethodsGetValueEval(Info: TProgramInfo; ExtObject: TObject); 92 | procedure dwsUnitDelphiASTClassesTValuedSyntaxNodeMethodsSetValueEval(Info: TProgramInfo; ExtObject: TObject); 93 | procedure dwsUnitDelphiASTClassesTCommentNodeMethodsGetTextEval(Info: TProgramInfo; ExtObject: TObject); 94 | procedure dwsUnitDelphiASTClassesTCommentNodeMethodsSetTextEval(Info: TProgramInfo; ExtObject: TObject); 95 | procedure dwsUnitEditorClassesIOTAEditorMethodsGetFileNameEval( 96 | Info: TProgramInfo; ExtObject: TObject); 97 | procedure dwsUnitEditorClassesIOTAEditorMethodsShowEval(Info: TProgramInfo; 98 | ExtObject: TObject); 99 | procedure dwsUnitEditorClassesIOTAEditorMethodsGetModifiedEval( 100 | Info: TProgramInfo; ExtObject: TObject); 101 | procedure dwsUnitEditorClassesIOTAEditorMethodsMarkModifiedEval( 102 | Info: TProgramInfo; ExtObject: TObject); 103 | procedure dwsUnitEditorClassesIOTAEditPositionMethodsAlignEval( 104 | Info: TProgramInfo; ExtObject: TObject); 105 | procedure dwsUnitEditorClassesIOTAEditPositionMethodsBackspaceDeleteEval( 106 | Info: TProgramInfo; ExtObject: TObject); 107 | private 108 | FUnitRTTI: TdwsUnit; 109 | {$IFDEF UseCryptoModule} 110 | FCryptoLib: TdwsCryptoLib; 111 | {$ENDIF} 112 | {$IFDEF UseClassesLib} 113 | FClassesLib: TdwsClassesLib; 114 | FEncodingLib: TdwsEncodingLib; 115 | {$ENDIF} 116 | {$IFDEF UseIndyLib} 117 | FIndyLib: TdwsIndyLib; 118 | {$ENDIF} 119 | {$IFDEF UseSymbolsLib} 120 | FSymbolsLib: TdwsSymbolsLib; 121 | {$ENDIF} 122 | procedure DoGetSelfInstance(Info: TProgramInfo); 123 | function GetSyntaxNode(InterfaceOnly: Boolean = False): TSyntaxNode; 124 | function GetEditBuffer: IOTAEditBuffer; 125 | function GetEditView: IOTAEditView; 126 | procedure SetEditorFocus(EditView: IOTAEditView); 127 | public 128 | end; 129 | 130 | TIUnknownContainer = class 131 | Intf: IUnknown; 132 | end; 133 | 134 | implementation 135 | 136 | {%CLASSGROUP 'System.Classes.TPersistent'} 137 | 138 | {$R *.dfm} 139 | 140 | uses 141 | dwsUtils, dwsXPlatform, DWScriptExpertForm; 142 | 143 | { TDataModuleScript } 144 | 145 | procedure TDataModuleScript.DataModuleCreate(Sender: TObject); 146 | begin 147 | FUnitRTTI := TdwsUnit.Create(nil); 148 | FUnitRTTI.UnitName := 'IDE'; 149 | FUnitRTTI.Script := DelphiWebScript; 150 | FUnitRTTI.Dependencies.Add(RTTI_UnitName); 151 | 152 | with FUnitRTTI.Functions.Add do 153 | begin 154 | Name := 'Self'; 155 | ResultType := 'RTTIVariant'; 156 | OnEval := DoGetSelfInstance; 157 | end; 158 | 159 | {$IFDEF UseCryptoModule} 160 | FCryptoLib := TdwsCryptoLib.Create(nil); 161 | FCryptoLib.dwsCrypto.Script := DelphiWebScript; 162 | {$ENDIF} 163 | 164 | {$IFDEF UseClassesLib} 165 | FClassesLib := TdwsClassesLib.Create(nil); 166 | FClassesLib.Script := DelphiWebScript; 167 | 168 | FEncodingLib := TdwsEncodingLib.Create(nil); 169 | FEncodingLib.dwsEncoding.Script := DelphiWebScript; 170 | {$ENDIF} 171 | 172 | {$IFDEF UseIndyLib} 173 | FIndyLib := TdwsIndyLib.Create(nil); 174 | FIndyLib.Script := DelphiWebScript; 175 | {$ENDIF} 176 | 177 | {$IFDEF UseSymbolsLib} 178 | FSymbolsLib := TdwsSymbolsLib.Create(nil); 179 | FSymbolsLib.Script := DelphiWebScript; 180 | {$ENDIF} 181 | end; 182 | 183 | procedure TDataModuleScript.DataModuleDestroy(Sender: TObject); 184 | begin 185 | {$IFDEF UseSymbolsLib} 186 | FreeAndNil(FSymbolsLib); 187 | {$ENDIF} 188 | {$IFDEF UseIndyLib} 189 | FreeAndNil(FIndyLib); 190 | {$ENDIF} 191 | {$IFDEF UseClassesLib} 192 | FreeAndNil(FEncodingLib); 193 | FreeAndNil(FClassesLib); 194 | {$ENDIF} 195 | {$IFDEF UseCryptoModule} 196 | FreeAndNil(FCryptoLib); 197 | {$ENDIF} 198 | FreeAndNil(FUnitRTTI); 199 | end; 200 | 201 | procedure TDataModuleScript.DoGetSelfInstance(Info: TProgramInfo); 202 | begin 203 | Info.ResultAsVariant := TdwsRTTIVariant.FromObject(Self); 204 | end; 205 | 206 | function IsValidFileName(const FileName: TFileName): Boolean; 207 | var 208 | S: string; 209 | I: Integer; 210 | begin 211 | Result := False; 212 | S := FileName; 213 | repeat 214 | I := LastDelimiter('\/', S); 215 | MoveFile(nil, PChar(S)); 216 | if (GetLastError = ERROR_ALREADY_EXISTS) or ((GetFileAttributes( 217 | PChar(Copy(S, I + 1, MaxInt))) = INVALID_FILE_ATTRIBUTES) and 218 | (GetLastError=ERROR_INVALID_NAME)) then 219 | Exit; 220 | if I > 0 then 221 | S := Copy(S, 1, I - 1); 222 | until I = 0; 223 | Result := True; 224 | end; 225 | 226 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsGetAttributeCountEval( 227 | Info: TProgramInfo; ExtObject: TObject); 228 | begin 229 | Assert(ExtObject is TSyntaxNode); 230 | Info.ResultAsInteger := Length(TSyntaxNode(ExtObject).Attributes); 231 | end; 232 | 233 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsGetAttributeEval( 234 | Info: TProgramInfo; ExtObject: TObject); 235 | begin 236 | Assert(ExtObject is TSyntaxNode); 237 | Info.ResultAsString := TSyntaxNode(ExtObject).GetAttribute(TAttributeName(Info.ParamAsInteger[0])); 238 | end; 239 | 240 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsGetAttributeKeyEval( 241 | Info: TProgramInfo; ExtObject: TObject); 242 | begin 243 | Assert(ExtObject is TSyntaxNode); 244 | Info.ResultAsInteger := Integer(TSyntaxNode(ExtObject).Attributes[Info.ParamAsInteger[0]].Key); 245 | end; 246 | 247 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsGetChildCountEval( 248 | Info: TProgramInfo; ExtObject: TObject); 249 | begin 250 | Assert(ExtObject is TSyntaxNode); 251 | Info.ResultAsInteger := Length(TSyntaxNode(ExtObject).ChildNodes); 252 | end; 253 | 254 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsGetChildNodeEval( 255 | Info: TProgramInfo; ExtObject: TObject); 256 | var 257 | ChildNode: TSyntaxNode; 258 | ChildNodeObj: IScriptObj; 259 | begin 260 | Assert(ExtObject is TSyntaxNode); 261 | ChildNode := TSyntaxNode(ExtObject).ChildNodes[Info.ParamAsInteger[0]]; 262 | if Assigned(ChildNode) then 263 | begin 264 | Info.ResultAsVariant := Info.Vars['TSyntaxNode'].GetConstructor('Create', ChildNode).Call.Value; 265 | (* 266 | ChildNodeObj := Info.ResultAsVariant as IScriptObj; 267 | ChildNodeObj. 268 | // ToDo: store ParentNode 269 | *) 270 | end; 271 | end; 272 | 273 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTCommentNodeMethodsGetTextEval( 274 | Info: TProgramInfo; ExtObject: TObject); 275 | begin 276 | Assert(ExtObject is TCommentNode); 277 | Info.ResultAsString := TCommentNode(ExtObject).Text; 278 | end; 279 | 280 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTCommentNodeMethodsSetTextEval( 281 | Info: TProgramInfo; ExtObject: TObject); 282 | begin 283 | Assert(ExtObject is TCommentNode); 284 | TCommentNode(ExtObject).Text := Info.ParamAsString[0]; 285 | end; 286 | 287 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTCompoundSyntaxNodeMethodsGetEndColEval( 288 | Info: TProgramInfo; ExtObject: TObject); 289 | begin 290 | Assert(ExtObject is TCompoundSyntaxNode); 291 | Info.ResultAsInteger := TCompoundSyntaxNode(ExtObject).EndCol; 292 | end; 293 | 294 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTCompoundSyntaxNodeMethodsGetEndLineEval( 295 | Info: TProgramInfo; ExtObject: TObject); 296 | begin 297 | Assert(ExtObject is TCompoundSyntaxNode); 298 | Info.ResultAsInteger := TCompoundSyntaxNode(ExtObject).EndLine; 299 | end; 300 | 301 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetColEval( 302 | Info: TProgramInfo; ExtObject: TObject); 303 | begin 304 | Assert(ExtObject is TSyntaxNode); 305 | Info.ResultAsInteger := TSyntaxNode(ExtObject).Col; 306 | end; 307 | 308 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetFileNameEval( 309 | Info: TProgramInfo; ExtObject: TObject); 310 | begin 311 | Assert(ExtObject is TSyntaxNode); 312 | Info.ResultAsString := TSyntaxNode(ExtObject).FileName; 313 | end; 314 | 315 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetHasAttributesEval( 316 | Info: TProgramInfo; ExtObject: TObject); 317 | begin 318 | Assert(ExtObject is TSyntaxNode); 319 | Info.ResultAsBoolean := TSyntaxNode(ExtObject).HasAttributes; 320 | end; 321 | 322 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetHasChildrenEval( 323 | Info: TProgramInfo; ExtObject: TObject); 324 | begin 325 | Assert(ExtObject is TSyntaxNode); 326 | Info.ResultAsBoolean := TSyntaxNode(ExtObject).HasChildren; 327 | end; 328 | 329 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetLineEval( 330 | Info: TProgramInfo; ExtObject: TObject); 331 | begin 332 | Assert(ExtObject is TSyntaxNode); 333 | Info.ResultAsInteger := TSyntaxNode(ExtObject).Line 334 | end; 335 | 336 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTSyntaxNodeMethodsGetTypeEval( 337 | Info: TProgramInfo; ExtObject: TObject); 338 | begin 339 | Assert(ExtObject is TSyntaxNode); 340 | Info.ResultAsInteger := Integer(TSyntaxNode(ExtObject).Typ); 341 | end; 342 | 343 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTValuedSyntaxNodeMethodsGetValueEval( 344 | Info: TProgramInfo; ExtObject: TObject); 345 | begin 346 | Assert(ExtObject is TValuedSyntaxNode); 347 | Info.ResultAsString := TValuedSyntaxNode(ExtObject).Value; 348 | end; 349 | 350 | procedure TDataModuleScript.dwsUnitDelphiASTClassesTValuedSyntaxNodeMethodsSetValueEval( 351 | Info: TProgramInfo; ExtObject: TObject); 352 | begin 353 | Assert(ExtObject is TValuedSyntaxNode); 354 | TValuedSyntaxNode(ExtObject).Value := Info.ParamAsString[0]; 355 | end; 356 | 357 | procedure TDataModuleScript.dwsTSyntaxNodeMethodsHasAttributeEval( 358 | Info: TProgramInfo; ExtObject: TObject); 359 | begin 360 | Assert(ExtObject is TSyntaxNode); 361 | Info.ResultAsBoolean := TSyntaxNode(ExtObject).HasAttribute(TAttributeName(Info.ParamAsInteger[0])); 362 | end; 363 | 364 | procedure TDataModuleScript.dwsUnitDelphiASTFunctionsExportSyntaxTreeToXMLEval( 365 | Info: TProgramInfo); 366 | var 367 | SyntaxNode: TSyntaxNode; 368 | FileName: TFileName; 369 | Output: string; 370 | begin 371 | SyntaxNode := GetSyntaxNode; 372 | if Assigned(SyntaxNode) then 373 | begin 374 | Output := TSyntaxTreeWriter.ToXML(SyntaxNode); 375 | 376 | FileName := Info.ParamAsString[0]; 377 | 378 | // now eventually save output to UTF8 encoded file 379 | if IsValidFileName(FileName) then 380 | SaveTextToUTF8File(FileName, Output); 381 | end; 382 | end; 383 | 384 | procedure TDataModuleScript.dwsUnitDelphiASTFunctionsGetAbstractSyntaxTreeEval( 385 | info: TProgramInfo); 386 | var 387 | SyntaxNode: TSyntaxNode; 388 | begin 389 | SyntaxNode := GetSyntaxNode(Info.ParamAsBoolean[0]); 390 | 391 | if Assigned(SyntaxNode) then 392 | Info.ResultAsVariant := Info.Vars['TSyntaxNode'].GetConstructor('Create', SyntaxNode).Call.Value; 393 | end; 394 | 395 | procedure TDataModuleScript.dwsUnitDelphiASTFunctionsSyntaxNodeTypeToNameEval( 396 | info: TProgramInfo); 397 | begin 398 | Info.ResultAsString := SyntaxNodeNames[TSyntaxNodeType(Info.ParamAsInteger[0])]; 399 | end; 400 | 401 | procedure TDataModuleScript.dwsUnitDelphiASTFunctionsSyntaxNodeTypeToStringEval( 402 | info: TProgramInfo); 403 | begin 404 | Info.ResultAsString := GetEnumName(TypeInfo(TSyntaxNodeType), Info.ParamAsInteger[0]); 405 | end; 406 | 407 | procedure CreateScriptClassForInterface(Info: TProgramInfo; Intf: IUnknown; Name: string); 408 | var 409 | Container: TIUnknownContainer; 410 | begin 411 | // create interface container (ugly hack to store the interface) 412 | Container := TIUnknownContainer.Create; 413 | Container.Intf := Intf; 414 | 415 | // create script-side class "containing" the interface 416 | Info.ResultAsVariant := Info.Vars[Name].GetConstructor('Create', 417 | Container).Call.Value; 418 | end; 419 | 420 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorMethodsGetFileNameEval( 421 | Info: TProgramInfo; ExtObject: TObject); 422 | var 423 | Editor: IOTAEditor; 424 | begin 425 | // get editor 426 | Editor := (BorlandIDEServices as IOTAEditor); 427 | 428 | // get file name 429 | Info.ResultAsString := Editor.GetFileName; 430 | end; 431 | 432 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorMethodsGetModifiedEval( 433 | Info: TProgramInfo; ExtObject: TObject); 434 | var 435 | Editor: IOTAEditor; 436 | begin 437 | // get editor 438 | Editor := (BorlandIDEServices as IOTAEditor); 439 | 440 | // get file name 441 | Info.ResultAsBoolean := Editor.GetModified; 442 | end; 443 | 444 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorMethodsMarkModifiedEval( 445 | Info: TProgramInfo; ExtObject: TObject); 446 | var 447 | Editor: IOTAEditor; 448 | begin 449 | // get editor 450 | Editor := (BorlandIDEServices as IOTAEditor); 451 | 452 | // get file name 453 | Info.ResultAsBoolean := Editor.MarkModified; 454 | end; 455 | 456 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorMethodsShowEval( 457 | Info: TProgramInfo; ExtObject: TObject); 458 | var 459 | Editor: IOTAEditor; 460 | begin 461 | // get editor 462 | Editor := (BorlandIDEServices as IOTAEditor); 463 | 464 | // get file name 465 | Editor.Show; 466 | end; 467 | 468 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices60MethodsGetEditOptionsEval( 469 | Info: TProgramInfo; ExtObject: TObject); 470 | var 471 | EditOptions: IOTAEditOptions; 472 | Container: TIUnknownContainer; 473 | begin 474 | // get edit options 475 | EditOptions := (BorlandIDEServices as IOTAEditorServices).EditOptions; 476 | 477 | // create interface container (ugly hack to store the interface) 478 | Container := TIUnknownContainer.Create; 479 | Container.Intf := EditOptions; 480 | 481 | // create script-side class "containing" the interface 482 | Info.ResultAsVariant := Info.Vars['IOTAEditOptions'].GetConstructor('Create', Container).Call.Value; 483 | end; 484 | 485 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices60MethodsGetKeyboardServicesEval( 486 | Info: TProgramInfo; ExtObject: TObject); 487 | var 488 | KeyboardServices: IOTAKeyboardServices; 489 | Container: TIUnknownContainer; 490 | begin 491 | // get keyboard service 492 | KeyboardServices := (BorlandIDEServices as IOTAEditorServices).KeyboardServices; 493 | 494 | // create interface container (ugly hack to store the interface) 495 | Container := TIUnknownContainer.Create; 496 | Container.Intf := KeyboardServices; 497 | 498 | // create script-side class "containing" the interface 499 | Info.ResultAsVariant := Info.Vars['IOTAKeyboardServices'].GetConstructor('Create', Container).Call.Value; 500 | end; 501 | 502 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices60MethodsGetTopBufferEval( 503 | Info: TProgramInfo; ExtObject: TObject); 504 | var 505 | EditBuffer: IOTAEditBuffer; 506 | Container: TIUnknownContainer; 507 | begin 508 | // get buffer 509 | EditBuffer := (BorlandIDEServices as IOTAEditorServices).TopBuffer; 510 | 511 | // create interface container (ugly hack to store the interface) 512 | Container := TIUnknownContainer.Create; 513 | Container.Intf := EditBuffer; 514 | 515 | // create script-side class "containing" the interface 516 | Info.ResultAsVariant := Info.Vars['IOTAEditBuffer'].GetConstructor('Create', Container).Call.Value; 517 | end; 518 | 519 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices60MethodsGetTopViewEval( 520 | Info: TProgramInfo; ExtObject: TObject); 521 | var 522 | EditView: IOTAEditView; 523 | Container: TIUnknownContainer; 524 | begin 525 | // get edit view 526 | EditView := (BorlandIDEServices as IOTAEditorServices).TopView; 527 | 528 | // create interface container (ugly hack to store the interface) 529 | Container := TIUnknownContainer.Create; 530 | Container.Intf := EditView; 531 | 532 | // create script-side class "containing" the interface 533 | Info.ResultAsVariant := Info.Vars['IOTAEditView'].GetConstructor('Create', Container).Call.Value; 534 | end; 535 | 536 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsAddEditOptionsEval( 537 | Info: TProgramInfo; ExtObject: TObject); 538 | var 539 | EditOptions: IOTAEditOptions; 540 | Container: TIUnknownContainer; 541 | begin 542 | // adds a new IOTAEditOptions for IDString or return, if already existing 543 | EditOptions := (BorlandIDEServices as IOTAEditorServices).AddEditOptions(Info.ParamAsString[0]); 544 | 545 | // create interface container (ugly hack to store the interface) 546 | Container := TIUnknownContainer.Create; 547 | Container.Intf := EditOptions; 548 | 549 | // create script-side class "containing" the interface 550 | Info.ResultAsVariant := Info.Vars['IOTAEditView'].GetConstructor('Create', Container).Call.Value; 551 | end; 552 | 553 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsDeleteEditOptionsEval( 554 | Info: TProgramInfo; ExtObject: TObject); 555 | begin 556 | (BorlandIDEServices as IOTAEditorServices).DeleteEditOptions(Info.ParamAsString[0]); 557 | end; 558 | 559 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsCountEval( 560 | Info: TProgramInfo; ExtObject: TObject); 561 | begin 562 | Info.ResultAsInteger := (BorlandIDEServices as IOTAEditorServices).EditOptionsCount; 563 | end; 564 | 565 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsEval( 566 | Info: TProgramInfo; ExtObject: TObject); 567 | var 568 | EditOptions: IOTAEditOptions; 569 | Container: TIUnknownContainer; 570 | begin 571 | EditOptions := (BorlandIDEServices as IOTAEditorServices).GetEditOptions(Info.ParamAsString[0]); 572 | 573 | // create interface container (ugly hack to store the interface) 574 | Container := TIUnknownContainer.Create; 575 | Container.Intf := EditOptions; 576 | 577 | // create script-side class "containing" the interface 578 | Info.ResultAsVariant := Info.Vars['IOTAEditView'].GetConstructor('Create', Container).Call.Value; 579 | end; 580 | 581 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsForFileEval( 582 | Info: TProgramInfo; ExtObject: TObject); 583 | var 584 | EditOptions: IOTAEditOptions; 585 | begin 586 | EditOptions := (BorlandIDEServices as IOTAEditorServices).GetEditOptionsForFile(Info.ParamAsString[0]); 587 | Info.ResultAsVariant := Info.Vars['IOTAEditView'].GetConstructor('Create', nil).Call.Value; 588 | end; 589 | 590 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServices70MethodsGetEditOptionsIndexEval( 591 | Info: TProgramInfo; ExtObject: TObject); 592 | var 593 | EditOptions: IOTAEditOptions; 594 | begin 595 | EditOptions := (BorlandIDEServices as IOTAEditorServices).EditorOptions[Info.ParamAsInteger[0]]; 596 | Info.ResultAsVariant := Info.Vars['IOTAEditView'].GetConstructor('Create', nil).Call.Value; 597 | end; 598 | 599 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditorServicesMethodsGetEditOptionsIDStringEval( 600 | Info: TProgramInfo; ExtObject: TObject); 601 | var 602 | EditorServices: IOTAEditorServices; 603 | begin 604 | EditorServices := BorlandIDEServices as IOTAEditorServices; 605 | Info.ResultAsString := EditorServices.GetEditOptionsIDString(Info.ParamAsString[0]); 606 | end; 607 | 608 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditPositionMethodsAlignEval( 609 | Info: TProgramInfo; ExtObject: TObject); 610 | var 611 | EditPosition: IOTAEditPosition; 612 | begin 613 | // TODO: get editor position 614 | EditPosition := (BorlandIDEServices as IOTAEditPosition); 615 | 616 | EditPosition.Align(Info.ParamAsInteger[0]); 617 | end; 618 | 619 | procedure TDataModuleScript.dwsUnitEditorClassesIOTAEditPositionMethodsBackspaceDeleteEval( 620 | Info: TProgramInfo; ExtObject: TObject); 621 | var 622 | EditPosition: IOTAEditPosition; 623 | begin 624 | // TODO: get editor position 625 | EditPosition := (BorlandIDEServices as IOTAEditPosition); 626 | 627 | Info.ResultAsBoolean := EditPosition.BackspaceDelete(Info.ParamAsInteger[0]); 628 | end; 629 | 630 | procedure TDataModuleScript.dwsUnitEditorFunctionsCenterCursorEval( 631 | info: TProgramInfo); 632 | var 633 | EditView: IOTAEditView; 634 | begin 635 | // get edit view and check for availability 636 | EditView := GetEditView; 637 | if not Assigned(EditView) then 638 | Exit; 639 | 640 | // center cursor 641 | EditView.Center(Info.ParamAsInteger[0], Info.ParamAsInteger[1]); 642 | end; 643 | 644 | procedure TDataModuleScript.dwsUnitEditorFunctionsGotoBookmarkEval( 645 | info: TProgramInfo); 646 | var 647 | EditView: IOTAEditView; 648 | begin 649 | // get edit view and check for availability 650 | EditView := GetEditView; 651 | if not Assigned(EditView) then 652 | Exit; 653 | 654 | // goto bookmark 655 | EditView.BookmarkGoto(Info.ParamAsInteger[0]); 656 | end; 657 | 658 | procedure TDataModuleScript.dwsUnitEditorFunctionsInsertTextEval( 659 | info: TProgramInfo); 660 | var 661 | EditView: IOTAEditView; 662 | begin 663 | // get edit view and check for availability 664 | EditView := GetEditView; 665 | if not Assigned(EditView) then 666 | Exit; 667 | 668 | // goto bookmark 669 | EditView.Position.InsertText(Info.ParamAsString[0]); 670 | SetEditorFocus(EditView); 671 | end; 672 | 673 | procedure TDataModuleScript.dwsUnitEditorFunctionsMoveCursorEval( 674 | info: TProgramInfo); 675 | var 676 | EditView: IOTAEditView; 677 | begin 678 | // get edit view and check for availability 679 | EditView := GetEditView; 680 | if not Assigned(EditView) then 681 | Exit; 682 | 683 | // goto bookmark 684 | EditView.Position.MoveCursor(Info.ParamAsInteger[0]); 685 | SetEditorFocus(EditView); 686 | end; 687 | 688 | procedure TDataModuleScript.dwsUnitEditorFunctionsMoveOneWordLeftEval( 689 | info: TProgramInfo); 690 | var 691 | EditView: IOTAEditView; 692 | begin 693 | // get edit view and check for availability 694 | EditView := GetEditView; 695 | if not Assigned(EditView) then 696 | Exit; 697 | 698 | EditView.Position.MoveCursor(mmSkipWord + mmSkipLeft + mmSkipStream); 699 | EditView.Position.MoveCursor(mmSkipNonWord + mmSkipLeft + mmSkipStream); 700 | 701 | SetEditorFocus(EditView); 702 | end; 703 | 704 | procedure TDataModuleScript.dwsUnitEditorFunctionsMoveOneWordRightEval( 705 | info: TProgramInfo); 706 | var 707 | EditView: IOTAEditView; 708 | begin 709 | // get edit view and check for availability 710 | EditView := GetEditView; 711 | if not Assigned(EditView) then 712 | Exit; 713 | 714 | EditView.Position.MoveCursor(mmSkipWord + mmSkipRight + mmSkipStream); 715 | EditView.Position.MoveCursor(mmSkipNonWord + mmSkipRight + mmSkipStream); 716 | 717 | SetEditorFocus(EditView); 718 | end; 719 | 720 | procedure TDataModuleScript.dwsUnitEditorFunctionsPageDownEval( 721 | info: TProgramInfo); 722 | var 723 | EditView: IOTAEditView; 724 | begin 725 | // get edit view and check for availability 726 | EditView := GetEditView; 727 | if not Assigned(EditView) then 728 | Exit; 729 | 730 | // goto bookmark 731 | EditView.PageDown; 732 | end; 733 | 734 | procedure TDataModuleScript.dwsUnitEditorFunctionsPageUpEval( 735 | info: TProgramInfo); 736 | var 737 | EditView: IOTAEditView; 738 | begin 739 | // get edit view and check for availability 740 | EditView := GetEditView; 741 | if not Assigned(EditView) then 742 | Exit; 743 | 744 | // goto bookmark 745 | EditView.PageUp; 746 | end; 747 | 748 | procedure TDataModuleScript.dwsUnitEditorFunctionsReplaceAllEval( 749 | info: TProgramInfo); 750 | var 751 | EditView: IOTAEditView; 752 | EditBuffer: IOTAEditBuffer; 753 | ErrorCode, Result: Integer; 754 | Old, New: string; 755 | begin 756 | // get edit view and check for availability 757 | EditView := GetEditView; 758 | if not Assigned(EditView) then 759 | Exit; 760 | 761 | // get edit buffer 762 | EditBuffer := EditView.Buffer; 763 | Assert(Assigned(EditBuffer)); 764 | 765 | Old := Info.ParamAsString[0]; 766 | New := Info.ParamAsString[1]; 767 | 768 | // perform replace 769 | Result := EditBuffer.EditPosition.Replace(Old, New, True, False, True, 770 | sdForward, ErrorCode); 771 | 772 | Info.ResultAsBoolean := Result <> 0; 773 | 774 | // check for an error code and handle 775 | if ErrorCode <> 0 then 776 | raise Exception.Create( 777 | EditBuffer.EditPosition.GetSearchErrorString(ErrorCode)); 778 | 779 | // replace again 780 | while Result <> 0 do 781 | Result := EditBuffer.EditPosition.ReplaceAgain; 782 | end; 783 | 784 | procedure TDataModuleScript.SetEditorFocus(EditView: IOTAEditView); 785 | var 786 | Form: TCustomForm; 787 | 788 | function SetEditorControlFocus(AControl: TControl): Boolean; 789 | var 790 | Index: Integer; 791 | begin 792 | Result := False; 793 | if AControl = nil then 794 | Exit; 795 | 796 | if AControl is TWinControl then 797 | begin 798 | if AControl.Name = 'Editor' then 799 | begin 800 | TWinControl(AControl).SetFocus; 801 | Exit(True); 802 | end; 803 | for Index := 0 to TWinControl(AControl).ControlCount - 1 do 804 | begin 805 | Result := SetEditorControlFocus(TWinControl(AControl).Controls[Index]); 806 | if Result then 807 | Exit; 808 | end; 809 | end; 810 | end; 811 | 812 | begin 813 | // ensure that an edit view has been passed 814 | if not Assigned(EditView) then 815 | Exit; 816 | 817 | // show buffer and re-paint 818 | EditView.Buffer.Show; 819 | EditView.Paint; 820 | EditView.Buffer.Show; 821 | 822 | Form := EditView.GetEditWindow.Form; 823 | SetEditorControlFocus(Form); 824 | 825 | // show buffer and re-paint 826 | EditView.Buffer.Show; 827 | EditView.Paint; 828 | EditView.Buffer.Show; 829 | end; 830 | 831 | procedure TDataModuleScript.dwsUnitEditorFunctionsSelectCurrentWordEval( 832 | info: TProgramInfo); 833 | var 834 | EditView: IOTAEditView; 835 | EditPosition: IOTAEditPosition; 836 | EditBlock: IOTAEditBlock; 837 | begin 838 | // get edit view and check for availability 839 | EditView := GetEditView; 840 | if not Assigned(EditView) then 841 | Exit; 842 | 843 | EditPosition := EditView.Position; 844 | EditBlock := EditView.Block; 845 | if EditPosition.IsWordCharacter then 846 | EditPosition.MoveCursor(mmSkipLeft or mmSkipWord or mmSkipStream); 847 | if EditPosition.IsWhiteSpace then 848 | EditPosition.MoveCursor(mmSkipRight or mmSkipWhite or mmSkipStream); 849 | if not EditPosition.IsWhiteSpace then 850 | begin 851 | if not EditPosition.IsWordCharacter then 852 | EditPosition.MoveCursor(mmSkipRight or mmSkipNonWord or mmSkipStream); 853 | if EditPosition.IsWordCharacter then 854 | begin 855 | EditBlock.Reset; 856 | EditBlock.Style := btNonInclusive; 857 | EditBlock.BeginBlock; 858 | EditPosition.MoveCursor(mmSkipRight or mmSkipWord or mmSkipStream); 859 | EditBlock.EndBlock; 860 | end; 861 | end; 862 | 863 | SetEditorFocus(EditView); 864 | end; 865 | 866 | procedure TDataModuleScript.dwsUnitHelpFunctionsGetIOTAHelpServicesEval( 867 | info: TProgramInfo); 868 | var 869 | HelpServices: IOTAHelpServices; 870 | begin 871 | HelpServices := BorlandIDEServices as IOTAHelpServices; 872 | Info.ResultAsVariant := HelpServices as IDispatch; 873 | end; 874 | 875 | procedure TDataModuleScript.dwsUnitInternalFunctionsWriteLnEval( 876 | info: TProgramInfo); 877 | begin 878 | Assert(Owner is TDWScriptExpertDockForm); 879 | TDWScriptExpertDockForm(Owner).OutputMessage(Info.ParamAsString[0]); 880 | end; 881 | 882 | function TDataModuleScript.GetEditView: IOTAEditView; 883 | var 884 | EditorServices: IOTAEditorServices; 885 | begin 886 | EditorServices := BorlandIDEServices as IOTAEditorServices; 887 | Result := EditorServices.TopView; 888 | end; 889 | 890 | function TDataModuleScript.GetEditBuffer: IOTAEditBuffer; 891 | var 892 | EditView: IOTAEditView; 893 | begin 894 | // check for availability of an edit view 895 | EditView := GetEditView; 896 | if not Assigned(EditView) then 897 | Exit(nil); 898 | 899 | Result := EditView.Buffer; 900 | end; 901 | 902 | procedure TDataModuleScript.dwsUnitSimpleEditorFunctionsLocateTextEval( 903 | info: TProgramInfo); 904 | var 905 | EditView: IOTAEditView; 906 | ErrorCode: Integer; 907 | Found: Boolean; 908 | begin 909 | // get edit view and check for availability 910 | EditView := GetEditView; 911 | if not Assigned(EditView) then 912 | Exit; 913 | 914 | // search for given string 915 | Found := EditView.Buffer.EditPosition.Search(Info.ParamAsString[0], False, 916 | False, True, sdForward, ErrorCode); 917 | 918 | // eventually paint the view 919 | if Found then 920 | SetEditorFocus(EditView); 921 | 922 | Info.ResultAsBoolean := Found; 923 | end; 924 | 925 | procedure TDataModuleScript.dwsUnitSimpleEditorFunctionsSetCursorPositionEval( 926 | info: TProgramInfo); 927 | var 928 | EditView: IOTAEditView; 929 | CursorPos: TOTAEditPos; 930 | begin 931 | // get edit view and check for availability 932 | EditView := GetEditView; 933 | if not Assigned(EditView) then 934 | Exit; 935 | 936 | CursorPos.Line := Info.ParamAsInteger[0]; 937 | CursorPos.Col := Info.ParamAsInteger[1]; 938 | EditView.CursorPos := CursorPos; 939 | 940 | // set cursor position 941 | EditView.MoveViewToCursor; 942 | SetEditorFocus(EditView); 943 | end; 944 | 945 | function TDataModuleScript.GetSyntaxNode(InterfaceOnly: Boolean = False): TSyntaxNode; 946 | var 947 | EditBuffer: IOTAEditBuffer; 948 | EditReader: IOTAEditReader; 949 | Position: Integer; 950 | ByteReaded: Integer; 951 | Buffer: PAnsiChar; 952 | Stream: TWriteOnlyBlockStream; 953 | StringStream: TStringStream; 954 | PasSyntaxTreeBuilder: TPasSyntaxTreeBuilder; 955 | const 956 | CChunkSize = 8192; 957 | begin 958 | // get edit buffer and check for availability 959 | EditBuffer := GetEditBuffer; 960 | if not Assigned(EditBuffer) then 961 | Exit(nil); 962 | 963 | EditReader := EditBuffer.CreateReader; 964 | 965 | Stream := TWriteOnlyBlockStream.Create; 966 | try 967 | GetMem(Buffer, CChunkSize); 968 | try 969 | // read data in chunks of size CChunkSize (must be <= 65535) 970 | Position := 0; 971 | repeat 972 | ByteReaded := EditReader.GetText(Position, Buffer, CChunkSize); 973 | Stream.Write(Buffer^, ByteReaded); 974 | Position := Position + ByteReaded; 975 | until ByteReaded < CChunkSize; 976 | finally 977 | Dispose(Buffer); 978 | end; 979 | 980 | StringStream := TStringStream.Create(UTF8ToString(Stream.ToRawBytes)); 981 | try 982 | // reset string stream position 983 | StringStream.Position := 0; 984 | 985 | // build abstract syntax tree 986 | PasSyntaxTreeBuilder := TPasSyntaxTreeBuilder.Create; 987 | try 988 | PasSyntaxTreeBuilder.InterfaceOnly := InterfaceOnly; 989 | Result := PasSyntaxTreeBuilder.Run(StringStream); 990 | finally 991 | PasSyntaxTreeBuilder.Free; 992 | end; 993 | finally 994 | StringStream.Free; 995 | end; 996 | finally 997 | Stream.Free; 998 | end; 999 | end; 1000 | 1001 | end. 1002 | --------------------------------------------------------------------------------