ため、これらのリンクをチェックパッケージがアンロードされたときに削除され、アイテムの有効/無効が処理されると、このウィザードコードが役に立ちます。私は、GExpertsのドキュメンテーションが示しているサンプルウィザードのコードをスタータープロジェクトとして取り上げ、少し上手いスタートプロジェクトとしてここに掲載しました。 、彼らは「ウィザード」の意味は、「シンプルなIDEエキスパート」である
https://bitbucket.org/wpostma/helloworldwizard/
つまり、メニューで何かをに追加:あなたはこのコードを取得し、それを拡張する場合は、非常に迅速に開始することができますIDEは、IOTAWizardとIOTAMenuWizardを実装しています。このアプローチには多くの利点があり、GExpertsウィザードが書かれている方法です。
コードのコアは、パッケージ(DPK)に入れ、インストールされ、IDEに登録する必要がある。このスタータウィザード、ある:
// "Hello World!" for the OpenTools API (IDE versions 4 or greater)
// By Erik Berry: http://www.gexperts.org/, [email protected]
unit HelloWizardUnit;
interface
uses ToolsAPI;
type
// TNotifierObject has stub implementations for the necessary but
// unused IOTANotifer methods
THelloWizard = class(TNotifierObject, IOTAMenuWizard, IOTAWizard)
public
// IOTAWizard interface methods(required for all wizards/experts)
function GetIDString: string;
function GetName: string;
function GetState: TWizardState;
procedure Execute;
// IOTAMenuWizard (creates a simple menu item on the help menu)
function GetMenuText: string;
end;
implementation
uses Dialogs;
procedure THelloWizard.Execute;
begin
ShowMessage('Hello World!');
end;
function THelloWizard.GetIDString: string;
begin
Result := 'EB.HelloWizard';
end;
function THelloWizard.GetMenuText: string;
begin
Result := '&Hello Wizard';
end;
function THelloWizard.GetName: string;
begin
Result := 'Hello Wizard';
end;
function THelloWizard.GetState: TWizardState;
begin
Result := [wsEnabled];
end;
end.
登録コードは上に示されていないが、あなたが上記のリンクからこれをダウンロードするなら、それ自身の "Reg"(登録)ユニットに含まれています。 A tutorial link is on EDN here.
ルックアップGExpertsソースコード(http://gexperts.svn.sourceforge.net/viewvc/gexperts/)この方法で、IDEを拡張する方法を教えてください – ComputerSaysNo
またはCnWizardsにも['ソースコード](http://code.google.com/p/cnpack/source/browse/#svn%2Ftrunk%2Fcnwizards)利用可能ですが、それは学ぶのはかなり大きなプロジェクトです。 – TLama
@DorinDuminica OK – PresleyDias