File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ TIOTAFormInfo = record
2121 TIOTAUtils = class
2222 private
2323 class function ModuleIsPas (const AModule: IOTAModule): boolean;
24+ class function ModuleIsCpp (const AModule: IOTAModule): boolean;
2425 class function ModuleIsForm (const AModule: IOTAModule): boolean;
2526
2627 class procedure EnumComps (const AFormEditor: IOTAFormEditor; const ACallback: TProc<TComponent>);
@@ -102,7 +103,7 @@ class procedure TIOTAUtils.EnumForms(const AProc: TProc<TIOTAFormInfo>);
102103 LModule := LModuleServices.Modules[I];
103104 LEditor := GetFormEditorFromModule(LModule);
104105
105- if not (ModuleIsPas(LModule) and ModuleIsForm(LModule)) then
106+ if not (( ModuleIsPas(LModule) or ModuleIsCpp(LModule) ) and ModuleIsForm(LModule)) then
106107 Continue;
107108
108109 LDesigner := (LEditor as INTAFormEditor).FormDesigner;
@@ -305,12 +306,20 @@ class function TIOTAUtils.HasForms: boolean;
305306 LModuleServices := (BorlandIDEServices as IOTAModuleServices);
306307 for I := 0 to LModuleServices.ModuleCount - 1 do begin
307308 LModule := LModuleServices.Modules[I];
308- if ModuleIsPas(LModule) and ModuleIsForm(LModule) then
309+ if ( ModuleIsPas(LModule) or ModuleIsCpp(LModule) ) and ModuleIsForm(LModule) then
309310 Exit(true);
310311 end ;
311312 Result := false;
312313end ;
313314
315+ class function TIOTAUtils.ModuleIsCpp (const AModule: IOTAModule): boolean;
316+ begin
317+ if SameText(ExtractFileExt(AModule.FileName), ' .cpp' ) then
318+ Result := true
319+ else
320+ Result := false;
321+ end ;
322+
314323class function TIOTAUtils.ModuleIsForm (const AModule: IOTAModule): boolean;
315324var
316325 LEditor: IOTAFormEditor;
You can’t perform that action at this time.
0 commit comments