Skip to content

Commit 2215d79

Browse files
Fixed compile error.
1 parent ad3230e commit 2215d79

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

Source/IDE/DPM.IDE.IDENotifier.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ interface
4545
// need the StorageNotifier
4646

4747
type
48+
IDPMIDENotifier = interface
49+
['{E160109A-C7EA-4CE3-A49B-C91FD14B5E66}']
50+
procedure ProjectActivePlatformChanged(const platform : string);
51+
procedure ProjectRenamed(const oldFileName : string; const newFileName : string);
52+
end;
53+
4854
TDPMIDENotifier = class(TInterfacedObject, IOTANotifier, IOTAIDENotifier, IDPMIDENotifier)
4955
private
5056
FLogger : IDPMIDELogger;

Source/IDE/DPM.IDE.ProjectNotifier.pas

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface
1313
TDPMProjectNotifier = class(TInterfacedObject,IOTAProjectNotifier, IOTAModuleNotifier,IOTANotifier )
1414
private
1515
FLogger : IDPMIDELogger;
16-
FIDENotifier : IDPMIDENotifier;
16+
FIDENotifier : IInterface;
1717
FFileName : string;
1818
FProject : IOTAProject;
1919
FCurrentPlatform : string;
@@ -30,12 +30,13 @@ TDPMProjectNotifier = class(TInterfacedObject,IOTAProjectNotifier, IOTAModuleN
3030
procedure ModuleRenamed(const NewName: string);
3131
procedure IOTAProjectNotifier.ModuleRenamed = ModuleRenamedA;
3232
public
33-
constructor Create(const logger : IDPMIDELogger; const ideNotifier : IDPMIDENotifier; const fileName : string; const project : IOTAProject);
33+
constructor Create(const logger : IDPMIDELogger; const ideNotifier : IInterface; const fileName : string; const project : IOTAProject);
3434
end;
3535
implementation
3636

3737
uses
38-
System.SysUtils;
38+
System.SysUtils,
39+
DPM.IDE.IDENotifier;
3940

4041
{ TDPMProjectNotifier }
4142

@@ -54,9 +55,7 @@ function TDPMProjectNotifier.CheckOverwrite: Boolean;
5455
result := true;
5556
end;
5657

57-
constructor TDPMProjectNotifier.Create(const logger: IDPMIDELogger; const ideNotifier : IDPMIDENotifier; const fileName : string; const project : IOTAProject);
58-
var
59-
activeProject : IOTAProject;
58+
constructor TDPMProjectNotifier.Create(const logger: IDPMIDELogger; const ideNotifier : IInterface; const fileName : string; const project : IOTAProject);
6059
begin
6160
FLogger := logger;
6261
FIDENotifier := ideNotifier;
@@ -76,7 +75,7 @@ procedure TDPMProjectNotifier.Modified;
7675
if FCurrentPlatform <> FProject.CurrentPlatform then
7776
begin
7877
FCurrentPlatform := FProject.CurrentPlatform;
79-
FIDENotifier.ProjectActivePlatformChanged(FCurrentPlatform);
78+
(FIDENotifier as IDPMIDENotifier).ProjectActivePlatformChanged(FCurrentPlatform);
8079
end;
8180
end;
8281

@@ -102,7 +101,7 @@ procedure TDPMProjectNotifier.ModuleRenamed(const NewName: string);
102101
begin
103102
oldFileName := FFileName;
104103
FFileName := NewName;
105-
FIDENotifier.ProjectRenamed(oldFileName, newName);
104+
(FIDENotifier as IDPMIDENotifier).ProjectRenamed(oldFileName, newName);
106105
end;
107106

108107
end.

Source/IDE/DPM.IDE.Types.pas

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
interface
3030

3131
uses
32-
ToolsApi,
3332
DPM.Core.Constants,
3433
DPM.Core.Types;
3534

@@ -47,13 +46,6 @@ interface
4746

4847
TDPMSearchOptions = set of TDPMSearchOption;
4948

50-
IDPMIDENotifier = interface
51-
['{E160109A-C7EA-4CE3-A49B-C91FD14B5E66}']
52-
procedure ProjectActivePlatformChanged(const platform : string);
53-
procedure ProjectRenamed(const oldFileName : string; const newFileName : string);
54-
end;
55-
56-
5749

5850
const
5951
//The current IDE version to TCompilerVersion.

0 commit comments

Comments
 (0)