📄 tborcvswizardunit.pas
字号:
(* $Id: TBorCvsWizardunit.pas,v 1.4 2002/12/27 16:22:43 turbo Exp $
*
* IDE Wizard for the BorCVS plugin (implements the OpenToolsAPI Interface
* IOTAWizard)
* Also contains the DLL entry point
*
* Copyright 2001 by Thomas Bleier
* For license details see LICENSE.txt
*)
unit TBorCvsWizardunit;
{$I BORCVS.inc}
interface
uses
windows,
wintypes,
classes,
sysutils,
toolsapi,
menus,
TControllerUnit;
//---------------------------------------------------------------------------
type
TBorCvsWizard = class(TNotifierObject, IOTANotifier, IOTAWizard)
protected
FController: TController;
FCvsMenu: TMenuItem;
public
constructor create;
destructor destroy; override;
// Interface IOTAWizard
function GetIDString: string;
function GetName: string;
function GetState: TWizardState;
procedure Execute;
end;
implementation
//---------------------------------------------------------------------------
uses
dialogs,
TToolsApiHelperunit,
PELDebugit;
constructor TBorCvsWizard.create;
var
nta: INTAServices;
idemenu: TMainMenu;
begin
inherited create;
DebugStr('TBorCvsWizard.create');
FController := nil;
FCvsMenu := nil;
// create menu
nta := BorlandIDEServices as INTAServices;
if assigned(nta) then
begin
idemenu := nta.MainMenu;
if assigned(idemenu) then
begin
FCvsMenu := TMenuItem.Create(idemenu);
FCvsMenu.Caption := '&CVS';
FCvsMenu.Name := 'BorCVS';
idemenu.Items.Insert(idemenu.Items.Count - 2, FCvsMenu);
// everything else is done in the controller...
FController := TController.create;
if assigned(FCvsMenu) then
FController.CreateCvsMenu(FCvsMenu);
end
else
ShowMessage('BorCVS Internal Error: cannot get main menu!');
end
else
ShowMessage('BorCVS Internal Error: cannot get NTA services!');
end;
//---------------------------------------------------------------------------
destructor TBorCvsWizard.destroy;
begin
DebugStr('TBorCvsWizard.destroy');
FController.Free;
FCvsMenu.Free;
inherited destroy;
end;
//---------------------------------------------------------------------------
// Interface IOTAWizard
//---------------------------------------------------------------------------
procedure TBorCvsWizard.Execute;
begin
// do nothing !
end;
function TBorCvsWizard.GetIDString: string;
begin
result := 'ThomasBleier.BorCVS';
end;
//---------------------------------------------------------------------------
function TBorCvsWizard.GetName: string;
begin
result := 'BorCVS';
end;
//---------------------------------------------------------------------------
function TBorCvsWizard.GetState: TWizardState;
begin
result := [wsEnabled];
end;
//---------------------------------------------------------------------------
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -