|
| 1 | +unit DelphiCopilot.ModuleCreator.OTA; |
| 2 | + |
| 3 | +interface |
| 4 | + |
| 5 | +uses |
| 6 | + System.SysUtils, |
| 7 | + System.Classes, |
| 8 | + ToolsAPI; |
| 9 | + |
| 10 | +type |
| 11 | + TDelphiCopilotModuleCreatorOTA = class(TInterfacedobject, IOTACreator, IOTAModuleCreator) |
| 12 | + private |
| 13 | + FContentUnit: string; |
| 14 | + public |
| 15 | + //IOTACreator |
| 16 | + function GetCreatorType: string; |
| 17 | + function GetExisting: Boolean; |
| 18 | + function GetFileSystem: string; |
| 19 | + function GetOwner: IOTAModule; |
| 20 | + function GetUnnamed: Boolean; |
| 21 | + |
| 22 | + //IOTAModuleCreator |
| 23 | + function GetAncestorName: string; |
| 24 | + function GetImplFileName: string; |
| 25 | + function GetIntfFileName: string; |
| 26 | + function GetFormName: string; |
| 27 | + function GetMainForm: Boolean; |
| 28 | + function GetShowForm: Boolean; |
| 29 | + function GetShowSource: Boolean; |
| 30 | + function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile; |
| 31 | + function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; |
| 32 | + function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; |
| 33 | + procedure FormCreated(const FormEditor: IOTAFormEditor); |
| 34 | + |
| 35 | + constructor Create(const AContentUnit: string); |
| 36 | + end; |
| 37 | + |
| 38 | +implementation |
| 39 | + |
| 40 | +constructor TDelphiCopilotModuleCreatorOTA.Create(const AContentUnit: string); |
| 41 | +begin |
| 42 | + FContentUnit := AContentUnit.TrimRight; |
| 43 | +end; |
| 44 | + |
| 45 | +function TDelphiCopilotModuleCreatorOTA.GetCreatorType: string; |
| 46 | +begin |
| 47 | + Result := sApplication; |
| 48 | +end; |
| 49 | + |
| 50 | +function TDelphiCopilotModuleCreatorOTA.GetExisting: Boolean; |
| 51 | +begin |
| 52 | + Result := False; |
| 53 | +end; |
| 54 | + |
| 55 | +function TDelphiCopilotModuleCreatorOTA.GetFileSystem: string; |
| 56 | +begin |
| 57 | + Result := ''; |
| 58 | +end; |
| 59 | + |
| 60 | +function TDelphiCopilotModuleCreatorOTA.GetOwner: IOTAModule; |
| 61 | +begin |
| 62 | + Result := GetActiveProject; // (BorlandIDEServices as IOTAModuleServices).MainProjectGroup; |
| 63 | +end; |
| 64 | + |
| 65 | +function TDelphiCopilotModuleCreatorOTA.GetUnnamed: Boolean; |
| 66 | +begin |
| 67 | + Result := True; |
| 68 | +end; |
| 69 | + |
| 70 | +{IOTAModuleCreator} |
| 71 | +function TDelphiCopilotModuleCreatorOTA.GetAncestorName: string; |
| 72 | +begin |
| 73 | + Result := ''; |
| 74 | +end; |
| 75 | + |
| 76 | +function TDelphiCopilotModuleCreatorOTA.GetImplFileName: string; |
| 77 | +begin |
| 78 | + Result := ''; |
| 79 | +end; |
| 80 | + |
| 81 | +function TDelphiCopilotModuleCreatorOTA.GetIntfFileName: string; |
| 82 | +begin |
| 83 | + Result := ''; |
| 84 | +end; |
| 85 | + |
| 86 | +function TDelphiCopilotModuleCreatorOTA.GetFormName: string; |
| 87 | +begin |
| 88 | + Result := ''; |
| 89 | +end; |
| 90 | + |
| 91 | +function TDelphiCopilotModuleCreatorOTA.GetMainForm: Boolean; |
| 92 | +begin |
| 93 | + Result := False; |
| 94 | +end; |
| 95 | + |
| 96 | +function TDelphiCopilotModuleCreatorOTA.GetShowForm: Boolean; |
| 97 | +begin |
| 98 | + Result := False; |
| 99 | +end; |
| 100 | + |
| 101 | +function TDelphiCopilotModuleCreatorOTA.GetShowSource: Boolean; |
| 102 | +begin |
| 103 | + Result := True; |
| 104 | +end; |
| 105 | + |
| 106 | +function TDelphiCopilotModuleCreatorOTA.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile; |
| 107 | +begin |
| 108 | +end; |
| 109 | + |
| 110 | +function TDelphiCopilotModuleCreatorOTA.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; |
| 111 | +begin |
| 112 | + Result := TOTAFile.Create(FContentUnit); |
| 113 | +end; |
| 114 | + |
| 115 | +function TDelphiCopilotModuleCreatorOTA.NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; |
| 116 | +begin |
| 117 | +end; |
| 118 | + |
| 119 | +procedure TDelphiCopilotModuleCreatorOTA.FormCreated(const FormEditor: IOTAFormEditor); |
| 120 | +begin |
| 121 | +end; |
| 122 | + |
| 123 | +end. |
0 commit comments