1
0
mirror of synced 2024-11-15 00:43:50 +00:00

Added: Delphi 6 support

This commit is contained in:
Mark van Renswoude 2006-05-23 19:33:05 +00:00
parent 25f0fb41a1
commit 96deb77011
5 changed files with 18 additions and 9 deletions

BIN
Lib/D6/UnitSwitcherD6.bpl Normal file

Binary file not shown.

0
Lib/D6/placeholder.txt Normal file
View File

View File

@ -30,7 +30,7 @@ type
FViewFormAction: TContainedAction; FViewFormAction: TContainedAction;
protected protected
function ActiveFileName(): String; function ActiveFileName(): String;
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
function ActiveGroup(): IOTAProjectGroup; function ActiveGroup(): IOTAProjectGroup;
{$ENDIF} {$ENDIF}
function ActiveProject(): IOTAProject; function ActiveProject(): IOTAProject;
@ -58,7 +58,7 @@ begin
Assert(Supports(BorlandIDEServices, IOTAModuleServices), Assert(Supports(BorlandIDEServices, IOTAModuleServices),
'BorlandIDEServices does not support the ' + 'BorlandIDEServices does not support the ' +
'IOTAModuleServices interface.'); 'IOTAModuleServices interface.');
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
Assert(Supports(BorlandIDEServices, IOTAActionServices), Assert(Supports(BorlandIDEServices, IOTAActionServices),
'BorlandIDEServices does not support the ' + 'BorlandIDEServices does not support the ' +
'IOTAActionServices interface.'); 'IOTAActionServices interface.');
@ -116,7 +116,7 @@ begin
end; end;
end; end;
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
function TUnitSwitcherHook.ActiveGroup(): IOTAProjectGroup; function TUnitSwitcherHook.ActiveGroup(): IOTAProjectGroup;
var var
module: IOTAModule; module: IOTAModule;
@ -136,7 +136,7 @@ end;
{$ENDIF} {$ENDIF}
function TUnitSwitcherHook.ActiveProject(): IOTAProject; function TUnitSwitcherHook.ActiveProject(): IOTAProject;
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
var var
projectGroup: IOTAProjectGroup; projectGroup: IOTAProjectGroup;
module: IOTAModule; module: IOTAModule;
@ -145,7 +145,7 @@ var
{$ENDIF} {$ENDIF}
begin begin
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
Result := nil; Result := nil;
projectGroup := ActiveGroup(); projectGroup := ActiveGroup();
if not Assigned(projectGroup) then if not Assigned(projectGroup) then

View File

@ -1,7 +1,16 @@
// Lowest supprted version is Delphi 7. It lacks some OTA functionality // Lowest supprted version is Delphi 6. It lacks some OTA functionality
// in comparison to Delphi 2006. Note that UnitSwitcher has not been tested // in comparison to Delphi 2006. Note that UnitSwitcher has not been tested
// on any other Delphi version! // on any other Delphi version!
{$UNDEF DELPHI6}
{$UNDEF DELPHI7} {$UNDEF DELPHI7}
{$UNDEF DELPHI7ORLOWER}
{$IFDEF VER140}
{$DEFINE DELPHI6}
{$DEFINE DELPHI7ORLOWER}
{$ENDIF}
{$IFDEF VER150} {$IFDEF VER150}
{$DEFINE DELPHI7} {$DEFINE DELPHI7}
{$DEFINE DELPHI7ORLOWER}
{$ENDIF} {$ENDIF}

View File

@ -145,7 +145,7 @@ type
implementation implementation
uses uses
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
ActnList, ActnList,
{$ENDIF} {$ENDIF}
SysUtils; SysUtils;
@ -271,7 +271,7 @@ begin
end; end;
procedure TUnSwProjectUnit.Activate(const ASource: Boolean); procedure TUnSwProjectUnit.Activate(const ASource: Boolean);
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
var var
actionIndex: Integer; actionIndex: Integer;
ntaServices: INTAServices; ntaServices: INTAServices;
@ -279,7 +279,7 @@ var
{$ENDIF} {$ENDIF}
begin begin
{$IFDEF DELPHI7} {$IFDEF DELPHI7ORLOWER}
// Bit of a hack, but opening the file itself will result in Delphi 7 // Bit of a hack, but opening the file itself will result in Delphi 7
// reloading the project... // reloading the project...
ntaServices := (BorlandIDEServices as INTAServices); ntaServices := (BorlandIDEServices as INTAServices);