1
0
mirror of synced 2024-11-22 03:13:51 +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;
protected
function ActiveFileName(): String;
{$IFDEF DELPHI7}
{$IFDEF DELPHI7ORLOWER}
function ActiveGroup(): IOTAProjectGroup;
{$ENDIF}
function ActiveProject(): IOTAProject;
@ -58,7 +58,7 @@ begin
Assert(Supports(BorlandIDEServices, IOTAModuleServices),
'BorlandIDEServices does not support the ' +
'IOTAModuleServices interface.');
{$IFDEF DELPHI7}
{$IFDEF DELPHI7ORLOWER}
Assert(Supports(BorlandIDEServices, IOTAActionServices),
'BorlandIDEServices does not support the ' +
'IOTAActionServices interface.');
@ -116,7 +116,7 @@ begin
end;
end;
{$IFDEF DELPHI7}
{$IFDEF DELPHI7ORLOWER}
function TUnitSwitcherHook.ActiveGroup(): IOTAProjectGroup;
var
module: IOTAModule;
@ -136,7 +136,7 @@ end;
{$ENDIF}
function TUnitSwitcherHook.ActiveProject(): IOTAProject;
{$IFDEF DELPHI7}
{$IFDEF DELPHI7ORLOWER}
var
projectGroup: IOTAProjectGroup;
module: IOTAModule;
@ -145,7 +145,7 @@ var
{$ENDIF}
begin
{$IFDEF DELPHI7}
{$IFDEF DELPHI7ORLOWER}
Result := nil;
projectGroup := ActiveGroup();
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
// on any other Delphi version!
{$UNDEF DELPHI6}
{$UNDEF DELPHI7}
{$UNDEF DELPHI7ORLOWER}
{$IFDEF VER140}
{$DEFINE DELPHI6}
{$DEFINE DELPHI7ORLOWER}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE DELPHI7}
{$DEFINE DELPHI7ORLOWER}
{$ENDIF}

View File

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