mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 00:16:02 +02:00
cody: registration order
git-svn-id: trunk@30641 -
This commit is contained in:
parent
d750730b4e
commit
be5b54d28d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -558,6 +558,7 @@ components/codetools/ide/cody.pas svneol=native#text/pascal
|
|||||||
components/codetools/ide/codyctrls.pas svneol=native#text/plain
|
components/codetools/ide/codyctrls.pas svneol=native#text/plain
|
||||||
components/codetools/ide/codyfrm.lfm svneol=native#text/plain
|
components/codetools/ide/codyfrm.lfm svneol=native#text/plain
|
||||||
components/codetools/ide/codyfrm.pas svneol=native#text/plain
|
components/codetools/ide/codyfrm.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/codystrconsts.pas svneol=native#text/pascal
|
||||||
components/codetools/ide/languages/codystrconsts.it.po svneol=native#text/plain
|
components/codetools/ide/languages/codystrconsts.it.po svneol=native#text/plain
|
||||||
components/codetools/ide/languages/codystrconsts.po svneol=native#text/plain
|
components/codetools/ide/languages/codystrconsts.po svneol=native#text/plain
|
||||||
|
@ -36,7 +36,7 @@ uses
|
|||||||
CodeCache, CodeToolManager, FileProcs, PascalParserTool,
|
CodeCache, CodeToolManager, FileProcs, PascalParserTool,
|
||||||
BasicCodeTools, CodeAtom, CodeTree, FindDeclarationTool,
|
BasicCodeTools, CodeAtom, CodeTree, FindDeclarationTool,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDEDialogs, IDECommands, MenuIntf, LazIDEIntf, SrcEditorIntf,
|
IDEDialogs, LazIDEIntf, SrcEditorIntf,
|
||||||
// Cody
|
// Cody
|
||||||
CodyCtrls, CodyStrConsts;
|
CodyCtrls, CodyStrConsts;
|
||||||
|
|
||||||
@ -111,8 +111,6 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
|
|
||||||
procedure ShowAddAssignMethodDialog(Sender: TObject);
|
procedure ShowAddAssignMethodDialog(Sender: TObject);
|
||||||
|
|
||||||
function CompareAAMDItemsByName(Item1, Item2: Pointer): integer;
|
function CompareAAMDItemsByName(Item1, Item2: Pointer): integer;
|
||||||
@ -120,21 +118,6 @@ function CompareAnsistringWithAAMDItemName(AnAnsistring, Item: Pointer): integer
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
var
|
|
||||||
CmdCategory: TIDECommandCategory;
|
|
||||||
AddAssignMethodCommand: TIDECommand;
|
|
||||||
begin
|
|
||||||
CmdCategory:=IDECommandList.FindCategoryByName('CodeTools');
|
|
||||||
if CmdCategory=nil then
|
|
||||||
raise Exception.Create('cody: AddAssignMethodDlg.Register: command category CodeTools not found');
|
|
||||||
AddAssignMethodCommand:=RegisterIDECommand(CmdCategory, 'AddAssignMethod',
|
|
||||||
crsAddAssignMethod,
|
|
||||||
CleanIDEShortCut,CleanIDEShortCut,nil,@ShowAddAssignMethodDialog);
|
|
||||||
RegisterIDEMenuCommand(SrcEditSubMenuSource, 'AddAssignMethod',
|
|
||||||
crsAddAssignMethod2,nil,nil,AddAssignMethodCommand);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure ShowAddAssignMethodDialog(Sender: TObject);
|
procedure ShowAddAssignMethodDialog(Sender: TObject);
|
||||||
|
|
||||||
procedure ErrorNotInClass;
|
procedure ErrorNotInClass;
|
||||||
|
@ -15,10 +15,9 @@
|
|||||||
<Description Value="IDE extensions using Codetools."/>
|
<Description Value="IDE extensions using Codetools."/>
|
||||||
<License Value="GPL2"/>
|
<License Value="GPL2"/>
|
||||||
<Version Major="1" Release="1"/>
|
<Version Major="1" Release="1"/>
|
||||||
<Files Count="5">
|
<Files Count="6">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="ppulistdlg.pas"/>
|
<Filename Value="ppulistdlg.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
|
||||||
<UnitName Value="PPUListDlg"/>
|
<UnitName Value="PPUListDlg"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
@ -27,19 +26,21 @@
|
|||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<Filename Value="addassignmethoddlg.pas"/>
|
<Filename Value="addassignmethoddlg.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
|
||||||
<UnitName Value="AddAssignMethodDlg"/>
|
<UnitName Value="AddAssignMethodDlg"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4>
|
<Item4>
|
||||||
<Filename Value="codyctrls.pas"/>
|
<Filename Value="codyctrls.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
|
||||||
<UnitName Value="CodyCtrls"/>
|
<UnitName Value="CodyCtrls"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
<Item5>
|
<Item5>
|
||||||
<Filename Value="codyfrm.pas"/>
|
<Filename Value="codyfrm.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<UnitName Value="CodyFrm"/>
|
||||||
<UnitName Value="codyfrm"/>
|
|
||||||
</Item5>
|
</Item5>
|
||||||
|
<Item6>
|
||||||
|
<Filename Value="codyregistration.pas"/>
|
||||||
|
<HasRegisterProc Value="True"/>
|
||||||
|
<UnitName Value="CodyRegistration"/>
|
||||||
|
</Item6>
|
||||||
</Files>
|
</Files>
|
||||||
<LazDoc Paths="doc"/>
|
<LazDoc Paths="doc"/>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -8,16 +8,13 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
PPUListDlg, CodyStrConsts, AddAssignMethodDlg, CodyCtrls, CodyFrm,
|
PPUListDlg, CodyStrConsts, AddAssignMethodDlg, CodyCtrls, CodyFrm,
|
||||||
LazarusPackageIntf;
|
CodyRegistration, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
RegisterUnit('PPUListDlg', @PPUListDlg.Register);
|
RegisterUnit('CodyRegistration', @CodyRegistration.Register);
|
||||||
RegisterUnit('AddAssignMethodDlg', @AddAssignMethodDlg.Register);
|
|
||||||
RegisterUnit('CodyCtrls', @CodyCtrls.Register);
|
|
||||||
RegisterUnit('CodyFrm', @CodyFrm.Register);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -41,15 +41,8 @@ type
|
|||||||
procedure FreeNodeData;
|
procedure FreeNodeData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
begin
|
|
||||||
RegisterComponents('LazControls',[TCodyTreeView]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TCodyTreeView }
|
{ TCodyTreeView }
|
||||||
|
|
||||||
procedure TCodyTreeView.FreeNodeData;
|
procedure TCodyTreeView.FreeNodeData;
|
||||||
|
@ -34,7 +34,7 @@ uses
|
|||||||
// codetools
|
// codetools
|
||||||
CodeToolManager, CodeCache,
|
CodeToolManager, CodeCache,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf, IDEDialogs,
|
LazIDEIntf, SrcEditorIntf, IDEDialogs,
|
||||||
// cody
|
// cody
|
||||||
CodyStrConsts;
|
CodyStrConsts;
|
||||||
|
|
||||||
@ -49,8 +49,6 @@ var
|
|||||||
|
|
||||||
procedure RemoveWithBlockCmd(Sender: TObject);
|
procedure RemoveWithBlockCmd(Sender: TObject);
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure RemoveWithBlockCmd(Sender: TObject);
|
procedure RemoveWithBlockCmd(Sender: TObject);
|
||||||
@ -85,21 +83,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
var
|
|
||||||
CmdCategory: TIDECommandCategory;
|
|
||||||
RemoveWithBlockCommand: TIDECommand;
|
|
||||||
begin
|
|
||||||
CmdCategory:=IDECommandList.FindCategoryByName('CodeTools');
|
|
||||||
if CmdCategory=nil then
|
|
||||||
raise Exception.Create('cody: CodyFrm.Register: command category CodeTools not found');
|
|
||||||
RemoveWithBlockCommand:=RegisterIDECommand(CmdCategory, 'RemoveWithBlock',
|
|
||||||
crsRemoveWithBlock,
|
|
||||||
CleanIDEShortCut,CleanIDEShortCut,nil,@RemoveWithBlockCmd);
|
|
||||||
RegisterIDEMenuCommand(SrcEditSubMenuRefactor, 'RemoveWithBlock',
|
|
||||||
crsRemoveWithBlock, nil, nil, RemoveWithBlockCommand);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
79
components/codetools/ide/codyregistration.pas
Normal file
79
components/codetools/ide/codyregistration.pas
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Author: Mattias Gaertner
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
LCL controls for Cody.
|
||||||
|
}
|
||||||
|
unit CodyRegistration;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils,
|
||||||
|
IDECommands, MenuIntf,
|
||||||
|
CodyFrm, CodyStrConsts, CodyCtrls, PPUListDlg, AddAssignMethodDlg;
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
var
|
||||||
|
CmdCategory: TIDECommandCategory;
|
||||||
|
PPUListCommand: TIDECommand;
|
||||||
|
AddAssignMethodCommand: TIDECommand;
|
||||||
|
RemoveWithBlockCommand: TIDECommand;
|
||||||
|
begin
|
||||||
|
CmdCategory:=IDECommandList.FindCategoryByName('ProjectMenu');
|
||||||
|
if CmdCategory=nil then
|
||||||
|
raise Exception.Create('cody: PPUListDlg.Register: command category ProjectMenu not found');
|
||||||
|
// show ppu list of project
|
||||||
|
PPUListCommand:=RegisterIDECommand(CmdCategory, 'ShowPPUList',
|
||||||
|
crsShowUsedPpuFiles,
|
||||||
|
CleanIDEShortCut,CleanIDEShortCut,nil,@ShowPPUList);
|
||||||
|
RegisterIDEMenuCommand(itmProjectWindowSection,'PPUList',crsShowUsedPpuFiles,
|
||||||
|
nil,nil,PPUListCommand);
|
||||||
|
|
||||||
|
CmdCategory:=IDECommandList.FindCategoryByName('CodeTools');
|
||||||
|
if CmdCategory=nil then
|
||||||
|
raise Exception.Create('cody: AddAssignMethodDlg.Register: command category CodeTools not found');
|
||||||
|
// add Assign method
|
||||||
|
AddAssignMethodCommand:=RegisterIDECommand(CmdCategory, 'AddAssignMethod',
|
||||||
|
crsAddAssignMethod,
|
||||||
|
CleanIDEShortCut,CleanIDEShortCut,nil,@ShowAddAssignMethodDialog);
|
||||||
|
RegisterIDEMenuCommand(SrcEditSubMenuSource, 'AddAssignMethod',
|
||||||
|
crsAddAssignMethod2,nil,nil,AddAssignMethodCommand);
|
||||||
|
// remove With block
|
||||||
|
RemoveWithBlockCommand:=RegisterIDECommand(CmdCategory, 'RemoveWithBlock',
|
||||||
|
crsRemoveWithBlock,
|
||||||
|
CleanIDEShortCut,CleanIDEShortCut,nil,@RemoveWithBlockCmd);
|
||||||
|
RegisterIDEMenuCommand(SrcEditSubMenuRefactor, 'RemoveWithBlock',
|
||||||
|
crsRemoveWithBlock, nil, nil, RemoveWithBlockCommand);
|
||||||
|
|
||||||
|
// components
|
||||||
|
RegisterComponents('LazControls',[TCodyTreeView]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -34,7 +34,7 @@ uses
|
|||||||
Graphics, Dialogs, ButtonPanel, Grids, StdCtrls, AvgLvlTree, ExtCtrls,
|
Graphics, Dialogs, ButtonPanel, Grids, StdCtrls, AvgLvlTree, ExtCtrls,
|
||||||
ComCtrls,
|
ComCtrls,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDECommands, MenuIntf, ProjectIntf, LazIDEIntf, IDEDialogs, IDEWindowIntf,
|
ProjectIntf, LazIDEIntf, IDEDialogs, IDEWindowIntf,
|
||||||
PackageIntf,
|
PackageIntf,
|
||||||
// codetools
|
// codetools
|
||||||
BasicCodeTools, FileProcs, CodyStrConsts, CodeToolManager, CodeCache,
|
BasicCodeTools, FileProcs, CodyStrConsts, CodeToolManager, CodeCache,
|
||||||
@ -148,8 +148,6 @@ procedure ShowPPUList(Sender: TObject);
|
|||||||
function ComparePPUListItems(Item1, Item2: Pointer): integer;
|
function ComparePPUListItems(Item1, Item2: Pointer): integer;
|
||||||
function CompareUnitNameWithPPUListItem(TheUnitName, Item: Pointer): integer;
|
function CompareUnitNameWithPPUListItem(TheUnitName, Item: Pointer): integer;
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -188,22 +186,6 @@ begin
|
|||||||
Result:=CompareIdentifiers(un,PChar(li.TheUnitName));
|
Result:=CompareIdentifiers(un,PChar(li.TheUnitName));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
|
||||||
var
|
|
||||||
CmdCategory: TIDECommandCategory;
|
|
||||||
PPUListCommand: TIDECommand;
|
|
||||||
begin
|
|
||||||
CmdCategory:=IDECommandList.FindCategoryByName('ProjectMenu');
|
|
||||||
if CmdCategory=nil then
|
|
||||||
raise Exception.Create('cody: PPUListDlg.Register: command category ProjectMenu not found');
|
|
||||||
PPUListCommand:=RegisterIDECommand(CmdCategory, 'ShowPPUList',
|
|
||||||
crsShowUsedPpuFiles,
|
|
||||||
CleanIDEShortCut,CleanIDEShortCut,nil,@ShowPPUList);
|
|
||||||
RegisterIDEMenuCommand(itmProjectWindowSection, 'PPUList', crsShowUsedPpuFiles
|
|
||||||
,
|
|
||||||
nil,nil,PPUListCommand);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TPPUListItem }
|
{ TPPUListItem }
|
||||||
|
|
||||||
destructor TPPUListItem.Destroy;
|
destructor TPPUListItem.Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user