mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 00:00:16 +02:00
cody: started unit dependencies dlg
git-svn-id: trunk@40003 -
This commit is contained in:
parent
a1515ebacb
commit
9b869cc4c5
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -791,6 +791,8 @@ components/codetools/ide/codynodeinfodlg.pas svneol=native#text/plain
|
||||
components/codetools/ide/codyopts.pas svneol=native#text/plain
|
||||
components/codetools/ide/codyregistration.pas svneol=native#text/plain
|
||||
components/codetools/ide/codystrconsts.pas svneol=native#text/pascal
|
||||
components/codetools/ide/codyunitdepwnd.lfm svneol=native#text/plain
|
||||
components/codetools/ide/codyunitdepwnd.pas svneol=native#text/plain
|
||||
components/codetools/ide/codyutils.pas svneol=native#text/pascal
|
||||
components/codetools/ide/declarevardlg.lfm svneol=native#text/plain
|
||||
components/codetools/ide/declarevardlg.pas svneol=native#text/pascal
|
||||
|
@ -19,7 +19,7 @@
|
||||
<Description Value="IDE extensions using Codetools."/>
|
||||
<License Value="GPL2"/>
|
||||
<Version Major="1" Minor="1"/>
|
||||
<Files Count="16">
|
||||
<Files Count="17">
|
||||
<Item1>
|
||||
<Filename Value="ppulistdlg.pas"/>
|
||||
<UnitName Value="PPUListDlg"/>
|
||||
@ -85,6 +85,10 @@
|
||||
<Filename Value="newidewnddlg.pas"/>
|
||||
<UnitName Value="newidewnddlg"/>
|
||||
</Item16>
|
||||
<Item17>
|
||||
<Filename Value="codyunitdepwnd.pas"/>
|
||||
<UnitName Value="codyunitdepwnd"/>
|
||||
</Item17>
|
||||
</Files>
|
||||
<LazDoc Paths="doc"/>
|
||||
<i18n>
|
||||
|
@ -10,7 +10,8 @@ uses
|
||||
PPUListDlg, CodyStrConsts, AddAssignMethodDlg, CodyCtrls, CodyFrm,
|
||||
CodyRegistration, DeclareVarDlg, CodyUtils, CodyNodeInfoDlg,
|
||||
CodyCopyDeclaration, AddWithBlockDlg, CodyIdentifiersDlg, CodyMiscOptsFrame,
|
||||
CodyOpts, TemplateIDEDockableWindow, NewIDEWndDlg, LazarusPackageIntf;
|
||||
CodyOpts, TemplateIDEDockableWindow, NewIDEWndDlg, CodyUnitDepWnd,
|
||||
LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -248,19 +248,19 @@ implementation
|
||||
|
||||
procedure ShowUnitDictionaryDialog(Sender: TObject);
|
||||
var
|
||||
CodyIdentifiersDlg: TCodyIdentifiersDlg;
|
||||
Dlg: TCodyIdentifiersDlg;
|
||||
begin
|
||||
CodyIdentifiersDlg:=TCodyIdentifiersDlg.Create(nil);
|
||||
Dlg:=TCodyIdentifiersDlg.Create(nil);
|
||||
try
|
||||
if not CodyIdentifiersDlg.Init then exit;
|
||||
if CodyIdentifiersDlg.ShowModal=mrOk then begin
|
||||
case CodyIdentifiersDlg.DlgAction of
|
||||
cidaUseIdentifier: CodyIdentifiersDlg.UseIdentifier;
|
||||
cidaJumpToIdentifier: CodyIdentifiersDlg.JumpToIdentifier;
|
||||
if not Dlg.Init then exit;
|
||||
if Dlg.ShowModal=mrOk then begin
|
||||
case Dlg.DlgAction of
|
||||
cidaUseIdentifier: Dlg.UseIdentifier;
|
||||
cidaJumpToIdentifier: Dlg.JumpToIdentifier;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
CodyIdentifiersDlg.Free;
|
||||
Dlg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -32,11 +32,12 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LazUTF8, LResources, LCLProc, Controls, Forms,
|
||||
MenuIntf, IDEWindowIntf, SrcEditorIntf, IDEOptionsIntf, ProjectIntf,
|
||||
IDECommands,
|
||||
IDECommands, NewIDEWndDlg,
|
||||
CodeToolManager,
|
||||
CodyStrConsts, CodyCtrls, PPUListDlg, AddAssignMethodDlg, AddWithBlockDlg,
|
||||
CodyUtils, CodyNodeInfoDlg, CodyFrm, DeclareVarDlg, CodyCopyDeclaration,
|
||||
CodyIdentifiersDlg, CodyMiscOptsFrame, CodyOpts, NewIDEWndDlg;
|
||||
CodyStrConsts, CodyUtils, CodyCtrls, CodyOpts,
|
||||
PPUListDlg, CodyUnitDepWnd, AddAssignMethodDlg, AddWithBlockDlg,
|
||||
CodyNodeInfoDlg, CodyFrm, DeclareVarDlg, CodyCopyDeclaration,
|
||||
CodyIdentifiersDlg, CodyMiscOptsFrame;
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -131,6 +132,12 @@ begin
|
||||
CreateSourceCommand(CmdCatCodeTools,'ShowUnitDictionary',
|
||||
crsShowUnitIdentifierDictionary,nil,@ShowUnitDictionaryDialog);
|
||||
|
||||
// Unit dependencies
|
||||
{$IFDEF EnableCodyExperiments}
|
||||
CreateSourceCommand(CmdCatCodeTools,'UnitDependencies',
|
||||
'Cody Unit Dependencies',nil,@ShowUnitDependenciesDialog);
|
||||
{$ENDIF}
|
||||
|
||||
// Refactor menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// declare variable
|
||||
|
41
components/codetools/ide/codyunitdepwnd.lfm
Normal file
41
components/codetools/ide/codyunitdepwnd.lfm
Normal file
@ -0,0 +1,41 @@
|
||||
object UnitDependenciesDialog: TUnitDependenciesDialog
|
||||
Left = 215
|
||||
Height = 390
|
||||
Top = 224
|
||||
Width = 486
|
||||
Caption = 'UnitDependenciesDialog'
|
||||
ClientHeight = 390
|
||||
ClientWidth = 486
|
||||
LCLVersion = '1.1'
|
||||
object BtnPanel: TPanel
|
||||
Left = 0
|
||||
Height = 41
|
||||
Top = 349
|
||||
Width = 486
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ClientHeight = 41
|
||||
ClientWidth = 486
|
||||
TabOrder = 0
|
||||
object CloseBitBtn: TBitBtn
|
||||
AnchorSideRight.Control = BtnPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 402
|
||||
Height = 27
|
||||
Top = 7
|
||||
Width = 77
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'CloseBitBtn'
|
||||
OnClick = CloseBitBtnClick
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Timer1: TTimer
|
||||
left = 230
|
||||
top = 187
|
||||
end
|
||||
end
|
53
components/codetools/ide/codyunitdepwnd.pas
Normal file
53
components/codetools/ide/codyunitdepwnd.pas
Normal file
@ -0,0 +1,53 @@
|
||||
unit CodyUnitDepWnd;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
Buttons;
|
||||
|
||||
type
|
||||
|
||||
{ TUnitDependenciesDialog }
|
||||
|
||||
TUnitDependenciesDialog = class(TForm)
|
||||
BtnPanel: TPanel;
|
||||
CloseBitBtn: TBitBtn;
|
||||
Timer1: TTimer;
|
||||
procedure CloseBitBtnClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
UnitDependenciesDialog: TUnitDependenciesDialog;
|
||||
|
||||
procedure ShowUnitDependenciesDialog(Sender: TObject);
|
||||
|
||||
implementation
|
||||
|
||||
procedure ShowUnitDependenciesDialog(Sender: TObject);
|
||||
var
|
||||
Dlg: TUnitDependenciesDialog;
|
||||
begin
|
||||
Dlg:=TUnitDependenciesDialog.Create(nil);
|
||||
try
|
||||
Dlg.ShowModal;
|
||||
finally
|
||||
Dlg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TUnitDependenciesDialog }
|
||||
|
||||
procedure TUnitDependenciesDialog.CloseBitBtnClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=mrOk;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user