/usr/lib/lazarus/0.9.30.4/ide/mainbase.pas is in lazarus-src-0.9.30.4 0.9.30.4-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | { $Id: mainbase.pas 28416 2010-11-22 18:46:25Z martin $ }
{
/***************************************************************************
mainbase.pas - the "integrated" in IDE
----------------------------------------
TMainIDEBase is the ancestor of TMainIDE. The various top level parts of the
IDE (called bosses/managers) access the TMainIDE via TMainIDEBase.
main.pp - TMainIDE = class(TMainIDEBase)
The highest manager/boss of the IDE. Only lazarus.pp uses
this unit.
mainbase.pas - TMainIDEBase = class(TMainIDEInterface)
The ancestor class used by (and only by) the other
bosses/managers like debugmanager, pkgmanager.
mainintf.pas - TMainIDEInterface = class(TLazIDEInterface)
The interface class of the top level functions of the IDE.
TMainIDEInterface is used by functions/units, that uses
several different parts of the IDE (designer, source editor,
codetools), so they can't be added to a specific boss and
which are yet too small to become a boss of their own.
lazideintf.pas - TLazIDEInterface = class(TComponent)
For designtime packages, this is the interface class of the
top level functions of the IDE.
***************************************************************************/
***************************************************************************
* *
* 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. *
* *
***************************************************************************
}
unit MainBase;
{$mode objfpc}{$H+}
interface
{$I ide.inc}
uses
{$IFDEF IDE_MEM_CHECK}
MemCheck,
{$ENDIF}
Classes, LCLType, LCLProc, LCLIntf, StdCtrls, Buttons, Menus, ComCtrls,
SysUtils, Controls, Graphics, ExtCtrls, Dialogs, FileUtil, Forms,
CodeToolManager, CodeCache, AVL_Tree, SynEditKeyCmds,
// IDEIntf
LazConf, LazarusIDEStrConsts, SrcEditorIntf, LazIDEIntf, MenuIntf,
IDECommands, IDEMsgIntf, IDEWindowIntf,
// IDE
ProjectDefs, Project, PublishModule, BuildLazDialog, Compiler,
ComponentReg, OutputFilter,
TransferMacros, ObjectInspector, PropEdits, IDEDefs, MsgView,
EnvironmentOpts, EditorOptions, CompilerOptions, KeyMapping, IDEProcs,
Debugger, IDEOptionDefs, CodeToolsDefines, Splash, Designer,
SourceEditor, BuildManager, FindInFilesDlg,
MainBar, MainIntf;
type
TResetToolFlag = (
rfInteractive,
rfCloseOnDone
);
TResetToolFlags = set of TResetToolFlag;
{ TMainIDEBase }
TMainIDEBase = class(TMainIDEInterface)
private
FToolStatus: TIDEToolStatus;
protected
FNeedUpdateHighlighters: boolean;
FLastWindowMenuUpdate: TDateTime;
function CreateMenuSeparator : TMenuItem;
procedure CreateMenuItem(Section: TIDEMenuSection;
var MenuCommand: TIDEMenuCommand;
const MenuItemName, MenuItemCaption: String;
const bmpName: String = '';
mnuEnabled: Boolean = true;
mnuChecked: Boolean = false);
procedure CreateMenuSeparatorSection(ParentSection: TIDEMenuSection;
var Section: TIDEMenuSection; const AName: String);
procedure CreateMenuSubSection(ParentSection: TIDEMenuSection;
var Section: TIDEMenuSection;
const AName, ACaption: String;
const bmpName: String = '');
procedure CreateMainMenuItem(var Section: TIDEMenuSection;
const MenuItemName, MenuItemCaption: String);
procedure SetupMainMenu; virtual;
procedure SetupFileMenu; virtual;
procedure SetupEditMenu; virtual;
procedure SetupSearchMenu; virtual;
procedure SetupViewMenu; virtual;
procedure SetupProjectMenu; virtual;
procedure SetupRunMenu; virtual;
procedure SetupComponentsMenu; virtual;
procedure SetupToolsMenu; virtual;
procedure SetupEnvironmentMenu; virtual;
procedure SetupWindowsMenu; virtual;
procedure SetupHelpMenu; virtual;
procedure LoadMenuShortCuts; virtual;
function GetToolStatus: TIDEToolStatus; override;
procedure SetToolStatus(const AValue: TIDEToolStatus); virtual;
procedure mnuWindowItemClick(Sender: TObject); virtual;
procedure mnuWindowSourceItemClick(Sender: TObject); virtual;
procedure OnMainBarDestroy(Sender: TObject); virtual;
procedure ConnectOutputFilter;
public
property ToolStatus: TIDEToolStatus read FToolStatus write SetToolStatus;
function DoResetToolStatus(AFlags: TResetToolFlags): boolean; virtual; abstract;
constructor Create(TheOwner: TComponent); override;
procedure StartIDE; virtual; abstract;
destructor Destroy; override;
procedure CreateOftenUsedForms; virtual; abstract;
function GetMainBar: TComponent; override;
procedure GetUnitInfoForDesigner(ADesigner: TIDesigner;
out ActiveSourceEditor: TSourceEditorInterface;
out ActiveUnitInfo: TUnitInfo); override;
procedure GetCurrentUnitInfo(out ActiveSourceEditor: TSourceEditorInterface;
out ActiveUnitInfo: TUnitInfo); override;
procedure GetCurrentUnit(out ActiveSourceEditor: TSourceEditor;
out ActiveUnitInfo: TUnitInfo); virtual; abstract;
procedure GetUnitWithPageIndex(PageIndex, WindowIndex: integer;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); virtual; abstract;
deprecated; // deprecated in 0.9.29 March 2010
procedure GetDesignerUnit(ADesigner: TDesigner;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); virtual; abstract;
procedure GetObjectInspectorUnit(
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); virtual; abstract;
procedure GetUnitWithForm(AForm: TCustomForm;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); virtual; abstract;
procedure GetUnitWithPersistent(APersistent: TPersistent;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); virtual; abstract;
function DoOpenMacroFile(Sender: TObject; const AFilename: string
): TModalResult; override;
procedure UpdateWindowMenu(Immediately: boolean = false); override;
procedure SetRecentSubMenu(Section: TIDEMenuSection; FileList: TStringList;
OnClickEvent: TNotifyEvent); override;
procedure UpdateHighlighters(Immediately: boolean = false); override;
function DoJumpToCodePosition(
ActiveSrcEdit: TSourceEditorInterface;
ActiveUnitInfo: TUnitInfo;
NewSource: TCodeBuffer; NewX, NewY, NewTopLine: integer;
AddJumpPoint: boolean;
MarkLine: Boolean = False): TModalResult; override;
function DoJumpToCodePos(
ActiveSrcEdit: TSourceEditor;
ActiveUnitInfo: TUnitInfo;
NewSource: TCodeBuffer; NewX, NewY, NewTopLine: integer;
AddJumpPoint: boolean;
FocusEditor: Boolean = True;
MarkLine: Boolean = False): TModalResult; virtual; abstract;
procedure FindInFilesPerDialog(AProject: TProject); override;
procedure FindInFiles(AProject: TProject; const FindText: string); override;
end;
var
MainIDE: TMainIDEBase = nil;
{ Normally the IDE builds itself with packages named in config files.
When the IDE should keep the packages installed in the current executable
set KeepInstalledPackages to true. }
var KeepInstalledPackages: boolean = false;
implementation
uses
IDEImagesIntf;
//{$IFDEF LCLCarbon}
//var
// mnuApple: TIDEMenuSection = nil;
//{$ENDIF}
{ TMainIDEBase }
procedure TMainIDEBase.mnuWindowItemClick(Sender: TObject);
var
i: Integer;
begin
i:=Screen.CustomFormCount-1;
while (i>=0) do begin
if Screen.CustomForms[i].Caption=(Sender as TIDEMenuCommand).Caption then
begin
IDEWindowCreators.ShowForm(Screen.CustomForms[i],true);
break;
end;
dec(i);
end;
end;
procedure TMainIDEBase.mnuWindowSourceItemClick(Sender: TObject);
var
i: LongInt;
begin
if SourceEditorManager = nil then exit;
i:=(sender as TIDEMenuCommand).tag;
if (i<0) or (i>=SourceEditorManager.SourceEditorCount) then exit;
SourceEditorManager.ActiveEditor := SourceEditorManager.SourceEditors[i];
SourceEditorManager.ShowActiveWindowOnTop(True);
end;
procedure TMainIDEBase.OnMainBarDestroy(Sender: TObject);
begin
//writeln('TMainIDEBase.OnMainBarDestroy');
end;
procedure TMainIDEBase.ConnectOutputFilter;
begin
TheOutputFilter.OnAddFilteredLine:=@MessagesView.AddMsg;
TheOutputFilter.OnReadLine:=@MessagesView.AddProgress;
TheOutputFilter.OnEndReading:=@MessagesView.CollectLineParts;
TheOutputFilter.OnBeginUpdate:=@MessagesView.BeginUpdateNotification;
TheOutputFilter.OnEndUpdate:=@MessagesView.EndUpdateNotification;
end;
procedure TMainIDEBase.SetToolStatus(const AValue: TIDEToolStatus);
begin
if FToolStatus=AValue then exit;
FToolStatus:=AValue;
UpdateCaption;
end;
constructor TMainIDEBase.Create(TheOwner: TComponent);
begin
MainIDE:=Self;
// Do not own everything in one big component hierachy. Otherwise the
// notifications slow down everything
fOwningComponent:=TComponent.Create(nil);
inherited Create(TheOwner);
end;
destructor TMainIDEBase.Destroy;
begin
FreeThenNil(fOwningComponent);
inherited Destroy;
MainIDE:=nil;
end;
procedure TMainIDEBase.GetUnitInfoForDesigner(ADesigner: TIDesigner;
out ActiveSourceEditor: TSourceEditorInterface; out ActiveUnitInfo: TUnitInfo
);
var
SrcEdit: TSourceEditor;
begin
ActiveSourceEditor:=nil;
ActiveUnitInfo:=nil;
if ADesigner is TDesigner then begin
GetDesignerUnit(TDesigner(ADesigner),SrcEdit,ActiveUnitInfo);
ActiveSourceEditor:=SrcEdit;
end;
end;
procedure TMainIDEBase.GetCurrentUnitInfo(
out ActiveSourceEditor: TSourceEditorInterface; out ActiveUnitInfo: TUnitInfo
);
var
ASrcEdit: TSourceEditor;
AnUnitInfo: TUnitInfo;
begin
GetCurrentUnit(ASrcEdit, AnUnitInfo);
ActiveSourceEditor:=ASrcEdit;
ActiveUnitInfo:=AnUnitInfo;
end;
function TMainIDEBase.GetMainBar: TComponent;
begin
Result:=MainIDEBar;
end;
function TMainIDEBase.CreateMenuSeparator : TMenuItem;
begin
Result := TMenuItem.Create(MainIDEBar);
Result.Caption := '-';
end;
procedure TMainIDEBase.CreateMenuItem(Section: TIDEMenuSection;
var MenuCommand: TIDEMenuCommand; const MenuItemName, MenuItemCaption: String;
const bmpName: String; mnuEnabled: Boolean; mnuChecked: Boolean);
begin
MenuCommand:=RegisterIDEMenuCommand(Section,MenuItemName,MenuItemCaption);
MenuCommand.Enabled:=mnuEnabled;
MenuCommand.Checked:=mnuChecked;
if bmpName<>'' then
MenuCommand.ImageIndex := IDEImages.LoadImage(16, bmpName);
end;
procedure TMainIDEBase.CreateMenuSeparatorSection(
ParentSection: TIDEMenuSection; var Section: TIDEMenuSection;
const AName: String);
begin
Section:=RegisterIDEMenuSection(ParentSection,AName);
Section.ChildsAsSubMenu := false;
end;
procedure TMainIDEBase.CreateMenuSubSection(ParentSection: TIDEMenuSection;
var Section: TIDEMenuSection; const AName, ACaption: String;
const bmpName: String = '');
begin
Section:=RegisterIDESubMenu(ParentSection,AName,ACaption);
if bmpName<>'' then
Section.ImageIndex := IDEImages.LoadImage(16, bmpName);
end;
procedure TMainIDEBase.CreateMainMenuItem(var Section: TIDEMenuSection;
const MenuItemName, MenuItemCaption: String);
begin
Section:=RegisterIDESubMenu(mnuMain,MenuItemName,MenuItemCaption);
end;
procedure TMainIDEBase.SetupMainMenu;
begin
MainIDEBar.mnuMainMenu := TMainMenu.Create(MainIDEBar);
MainIDEBar.mnuMainMenu.Images := IDEImages.Images_16;
with MainIDEBar do begin
mnuMain:=RegisterIDEMenuRoot('IDEMainMenu',nil);
{$ifdef LCLCarbon}
// Under Apple there is a special policy: every application should create
// a special Apple menu and put Quit, About there.
// See issue: http://bugs.freepascal.org/view.php?id=12294
// See http://lists.apple.com/archives/carbon-development/2002/Apr/msg01183.html, for details
//CreateMainMenuItem(mnuApple,'AppleApplication','');
{$endif}
CreateMainMenuItem(mnuFile,'File',lisMenuFile);
CreateMainMenuItem(mnuEdit,'Edit',lisMenuEdit);
CreateMainMenuItem(mnuSearch,'Search',lisMenuSearch);
CreateMainMenuItem(mnuView,'View',lisMenuView);
CreateMainMenuItem(mnuProject,'Project',lisMenuProject);
CreateMainMenuItem(mnuRun,'Run',lisMenuRun);
CreateMainMenuItem(mnuPackage,'Package',lisMenuPackage);
mnuComponent:=mnuPackage;
CreateMainMenuItem(mnuTools,'Tools',lisMenuTools);
CreateMainMenuItem(mnuEnvironment,'Environment',lisMenuEnvironent);
CreateMainMenuItem(mnuWindow,'Window',lisMenuWindow);
CreateMainMenuItem(mnuHelp,'Help',lisMenuHelp);
end;
end;
procedure TMainIDEBase.SetupFileMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuFile,itmFileNew,'itmFileNew');
ParentMI:=itmFileNew;
CreateMenuItem(ParentMI,itmFileNewUnit,'itmFileNewUnit',lisMenuNewUnit,'item_unit');
CreateMenuItem(ParentMI,itmFileNewForm,'itmFileNewForm',lisMenuNewForm,'item_form');
CreateMenuItem(ParentMI,itmFileNewOther,'itmFileNewOther',lisMenuNewOther,'menu_new');
CreateMenuSeparatorSection(mnuFile,itmFileOpenSave,'itmFileOpenSave');
ParentMI:=itmFileOpenSave;
CreateMenuItem(ParentMI, itmFileOpen, 'itmFileOpen', lisMenuOpen, 'laz_open');
CreateMenuItem(ParentMI,itmFileRevert,'itmFileRevert',lisMenuRevert, 'menu_file_revert');
CreateMenuSubSection(ParentMI,itmFileRecentOpen,'itmFileRecentOpen',lisMenuOpenRecent);
CreateMenuItem(ParentMI,itmFileSave,'itmFileSave',lisMenuSave,'laz_save');
CreateMenuItem(ParentMI,itmFileSaveAs,'itmFileSaveAs',lisMenuSaveAs,'menu_saveas');
CreateMenuItem(ParentMI,itmFileSaveAll,'itmFileSaveAll',lisMenuSaveAll,'menu_save_all');
CreateMenuItem(ParentMI,itmFileClose,'itmFileClose',lisMenuClose,'menu_close',false);
CreateMenuItem(ParentMI,itmFileCloseAll,'itmFileCloseAll',lisMenuCloseAll,'menu_close_all',false);
CreateMenuSeparatorSection(mnuFile,itmFileDirectories,'itmFileDirectories');
ParentMI:=itmFileDirectories;
CreateMenuItem(ParentMI,itmFileCleanDirectory,'itmFileCleanDirectory',lisMenuCleanDirectory, 'menu_clean');
CreateMenuSeparatorSection(mnuFile,itmFileIDEStart,'itmFileIDEStart');
ParentMI:=itmFileIDEStart;
CreateMenuItem(ParentMI,itmFileRestart,'itmFileRestart',lisMenuRestart, 'laz_refresh');
CreateMenuItem(ParentMI,itmFileQuit,'itmFileQuit',lisMenuQuit, 'menu_exit');
end;
end;
procedure TMainIDEBase.SetupEditMenu;
var
ParentMI: TIDEMenuSection;
SubParentMI: TIDEMenuSection;
SubSubParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuEdit,itmEditReUndo,'itmEditReUndo');
ParentMI:=itmEditReUndo;
CreateMenuItem(ParentMI,itmEditUndo,'itmEditUndo',lisMenuUndo,'menu_undo');
CreateMenuItem(ParentMI,itmEditRedo,'itmEditRedo',lisMenuRedo,'menu_redo');
CreateMenuSeparatorSection(mnuEdit,itmEditClipboard,'itmEditClipboard');
ParentMI:=itmEditClipboard;
CreateMenuItem(ParentMI,itmEditCut,'itmEditCut',lisMenuCut,'laz_cut');
CreateMenuItem(ParentMI,itmEditCopy,'itmEditCopy',lisMenuCopy,'laz_copy');
CreateMenuItem(ParentMI,itmEditPaste,'itmEditPaste',lisMenuPaste,'laz_paste');
CreateMenuSeparatorSection(mnuEdit,itmEditBlockIndentation,'itmEditBlockIndentation');
ParentMI:=itmEditBlockIndentation;
CreateMenuItem(ParentMI,itmEditIndentBlock,'itmEditIndentBlock',lisMenuIndentSelection,'menu_indent');
CreateMenuItem(ParentMI,itmEditUnindentBlock,'itmEditUnindentBlock',lisMenuUnindentSelection,'menu_unindent');
CreateMenuItem(ParentMI,itmEditEncloseBlock,'itmEditEncloseBlock',lisMenuEncloseSelection);
CreateMenuItem(ParentMI,itmEditCommentBlock,'itmEditCommentBlock',lisMenuCommentSelection, 'menu_comment');
CreateMenuItem(ParentMI,itmEditUncommentBlock,'itmEditUncommentBlock',lisMenuUncommentSelection, 'menu_uncomment');
CreateMenuItem(ParentMI,itmEditToggleComment,'itmEditToggleComment',lisMenuToggleComment, 'menu_comment');
CreateMenuItem(ParentMI,itmEditConditionalBlock,'itmEditConditionalBlock',lisMenuConditionalSelection);
CreateMenuItem(ParentMI,itmEditSortBlock,'itmEditSortBlock',lisMenuSortSelection, 'menu_edit_sort');
CreateMenuSeparatorSection(mnuEdit,itmEditBlockCharConversion,'itmEditBlockCharConversion');
ParentMI:=itmEditBlockCharConversion;
CreateMenuItem(ParentMI,itmEditUpperCaseBlock,'itmEditUpperCaseBlock',lisMenuUpperCaseSelection, 'menu_edit_uppercase');
CreateMenuItem(ParentMI,itmEditLowerCaseBlock,'itmEditLowerCaseBlock',lisMenuLowerCaseSelection, 'menu_edit_lowercase');
CreateMenuItem(ParentMI,itmEditTabsToSpacesBlock,'itmEditTabsToSpacesBlock',lisMenuTabsToSpacesSelection);
CreateMenuItem(ParentMI,itmEditSelectionBreakLines,'itmEditSelectionBreakLines',lisMenuBeakLinesInSelection);
CreateMenuSubSection(mnuEdit,itmEditSelect,'itmEditSelect',lisMenuSelect);
begin
// select sub menu items
SubParentMI:=itmEditSelect;
CreateMenuItem(SubParentMI,itmEditSelectAll,'itmEditSelectAll',lisMenuSelectAll, 'menu_select_all');
CreateMenuItem(SubParentMI,itmEditSelectToBrace,'itmEditSelectToBrace',lisMenuSelectToBrace);
CreateMenuItem(SubParentMI,itmEditSelectCodeBlock,'itmEditSelectCodeBlock',lisMenuSelectCodeBlock);
CreateMenuItem(SubParentMI,itmEditSelectLine,'itmEditSelectLine',lisMenuSelectLine);
CreateMenuItem(SubParentMI,itmEditSelectParagraph,'itmEditSelectParagraph',lisMenuSelectParagraph);
end;
CreateMenuSeparatorSection(mnuEdit,itmEditInsertions,'itmEditInsertions');
ParentMI:=itmEditInsertions;
CreateMenuItem(ParentMI,itmEditInsertCharacter,'itmEditInsertCharacter',lisMenuInsertCharacter);
CreateMenuSubSection(ParentMI,itmEditInsertText,'itmEditInsertText',lisMenuInsertText);
begin
// insert text sub menu items
SubParentMI:=itmEditInsertText;
CreateMenuSubSection(SubParentMI,itmEditInsertCVSKeyWord,'itmEditInsertCVSKeyWord',lisMenuInsertCVSKeyword);
begin
// insert CVS keyword sub menu items
SubSubParentMI:=itmEditInsertCVSKeyWord;
CreateMenuItem(SubSubParentMI,itmEditInsertCVSAuthor,'itmEditInsertCVSAuthor','Author');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSDate,'itmEditInsertCVSDate','Date');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSHeader,'itmEditInsertCVSHeader','Header');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSID,'itmEditInsertCVSID','ID');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSLog,'itmEditInsertCVSLog','Log');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSName,'itmEditInsertCVSName','Name');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSRevision,'itmEditInsertCVSRevision','Revision');
CreateMenuItem(SubSubParentMI,itmEditInsertCVSSource,'itmEditInsertCVSSource','Source');
end;
CreateMenuSubSection(SubParentMI,itmEditInsertGeneral,'itmEditInsertGeneral',lisMenuInsertGeneral);
begin
// insert general text sub menu items
SubSubParentMI:=itmEditInsertGeneral;
CreateMenuItem(SubSubParentMI,itmEditInsertGPLNotice,'itmEditInsertGPLNotice',lisMenuInsertGPLNotice);
CreateMenuItem(SubSubParentMI,itmEditInsertLGPLNotice,'itmEditInsertLGPLNotice',lisMenuInsertLGPLNotice);
CreateMenuItem(SubSubParentMI,itmEditInsertModifiedLGPLNotice,'itmEditInsertModifiedLGPLNotice',lisMenuInsertModifiedLGPLNotice);
CreateMenuItem(SubSubParentMI,itmEditInsertUsername,'itmEditInsertUsername',lisMenuInsertUsername);
CreateMenuItem(SubSubParentMI,itmEditInsertDateTime,'itmEditInsertDateTime',lisMenuInsertDateTime);
CreateMenuItem(SubSubParentMI,itmEditInsertChangeLogEntry,'itmEditInsertChangeLogEntry',lisMenuInsertChangeLogEntry);
CreateMenuItem(SubSubParentMI,itmEditInsertGUID,'itmEditInsertGUID',srkmecInsertGUID);
end;
end;
CreateMenuSeparatorSection(mnuEdit,itmEditMenuCodeTools,'itmEditMenuCodeTools');
ParentMI:=itmEditMenuCodeTools;
CreateMenuItem(ParentMI,itmEditCompleteCode,'itmEditCompleteCode',lisMenuCompleteCode);
CreateMenuItem(ParentMI,itmEditExtractProc,'itmEditExtractProc',lisMenuExtractProc);
end;
end;
procedure TMainIDEBase.SetupSearchMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuSearch,itmSearchFindReplace,'itmSearchFindReplace');
ParentMI:=itmSearchFindReplace;
CreateMenuItem(ParentMI, itmSearchFind, 'itmSearchFind', lisMenuFind2, 'menu_search_find');
CreateMenuItem(ParentMI,itmSearchFindNext,'itmSearchFindNext',lisMenuFindNext, 'menu_search_find_next');
CreateMenuItem(ParentMI,itmSearchFindPrevious,'itmSearchFindPrevious',lisMenuFindPrevious, 'menu_search_find_previous');
CreateMenuItem(ParentMI,itmSearchFindInFiles,'itmSearchFindInFiles',lisMenuFindInFiles, 'menu_search_files');
CreateMenuItem(ParentMI, itmSearchReplace, 'itmSearchReplace',
lisMenuReplace2, 'menu_search_replace');
CreateMenuItem(ParentMI,itmIncrementalFind,'itmIncrementalFind',lisMenuIncrementalFind, 'menu_search_incremental');
CreateMenuSeparatorSection(mnuSearch,itmJumpings,'itmJumpings');
ParentMI:=itmJumpings;
CreateMenuItem(ParentMI,itmGotoLine,'itmGotoLine',lisMenuGotoLine, 'menu_goto_line');
CreateMenuItem(ParentMI,itmJumpBack,'itmJumpBack',lisMenuJumpBack, 'menu_search_jumpback');
CreateMenuItem(ParentMI,itmJumpForward,'itmJumpForward',lisMenuJumpForward, 'menu_search_jumpforward');
CreateMenuItem(ParentMI,itmAddJumpPoint,'itmAddJumpPoint',lisMenuAddJumpPointToHistory);
CreateMenuItem(ParentMI,itmJumpToNextError,'itmJumpToNextError',lisMenuJumpToNextError);
CreateMenuItem(ParentMI,itmJumpToPrevError,'itmJumpToPrevError',lisMenuJumpToPrevError);
CreateMenuSeparatorSection(mnuSearch,itmBookmarks,'itmBookmarks');
ParentMI:=itmBookmarks;
CreateMenuItem(ParentMI,itmSetFreeBookmark,'itmSetFreeBookmark',lisMenuSetFreeBookmark);
CreateMenuItem(ParentMI,itmJumpToNextBookmark,'itmJumpToNextBookmark',lisMenuJumpToNextBookmark, 'menu_search_next_bookmark');
CreateMenuItem(ParentMI,itmJumpToPrevBookmark,'itmJumpToPrevBookmark',lisMenuJumpToPrevBookmark, 'menu_search_previous_bookmark');
CreateMenuSeparatorSection(mnuSearch,itmCodeToolSearches,'itmCodeToolSearches');
ParentMI:=itmCodeToolSearches;
CreateMenuItem(ParentMI,itmFindBlockOtherEnd,'itmFindBlockOtherEnd',lisMenuFindBlockOtherEndOfCodeBlock);
CreateMenuItem(ParentMI,itmFindBlockStart,'itmFindBlockStart',lisMenuFindCodeBlockStart);
CreateMenuItem(ParentMI,itmFindDeclaration,'itmFindDeclaration',lisMenuFindDeclarationAtCursor);
CreateMenuItem(ParentMI,itmOpenFileAtCursor,'itmOpenFileAtCursor',lisMenuOpenFilenameAtCursor,'menu_search_openfile_atcursor');
CreateMenuItem(ParentMI,itmGotoIncludeDirective,'itmGotoIncludeDirective',lisMenuGotoIncludeDirective);
CreateMenuItem(ParentMI,itmSearchFindIdentifierRefs,'itmSearchFindIdentifierRefs',lisMenuFindIdentifierRefs);
CreateMenuItem(ParentMI,itmSearchRenameIdentifier,'itmSearchRenameIdentifier',lisMenuRenameIdentifier);
CreateMenuItem(ParentMI,itmSearchProcedureList,'itmSearchProcedureList',lisMenuProcedureList);
end;
end;
procedure TMainIDEBase.SetupViewMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuView,itmViewMainWindows,'itmViewMainWindows');
ParentMI:=itmViewMainWindows;
CreateMenuItem(ParentMI,itmViewInspector,'itmViewInspector',lisMenuViewObjectInspector, 'menu_view_inspector');
CreateMenuItem(ParentMI,itmViewSourceEditor,'itmViewSourceEditor',lisMenuViewSourceEditor, 'menu_view_source_editor');
CreateMenuItem(ParentMI,itmViewMessage,'itmViewMessage',lisMenuViewMessages);
CreateMenuItem(ParentMI,itmViewCodeExplorer,'itmViewCodeExplorer',lisMenuViewCodeExplorer, 'menu_view_code_explorer');
CreateMenuItem(ParentMI,itmViewFPDocEditor,'itmViewFPDocEditor',lisMenuFPDocEditor);
CreateMenuItem(ParentMI,itmViewCodeBrowser,'itmViewCodeBrowser',lisMenuViewCodeBrowser, 'menu_view_code_browser');
CreateMenuItem(ParentMI,itmViewRestrictionBrowser,'itmViewRestrictionBrowser',lisMenuViewRestrictionBrowser, 'menu_view_rectriction_browser');
CreateMenuItem(ParentMI,itmViewComponents,'itmViewComponents',lisMenuViewComponents);
CreateMenuItem(ParentMI,itmJumpHistory,'itmJumpHistory',lisMenuViewJumpHistory);
CreateMenuSeparatorSection(mnuView,itmViewUnitWindows,'itmViewUnitWindows');
ParentMI:=itmViewUnitWindows;
CreateMenuItem(ParentMI,itmViewUnits,'itmViewUnits',lisMenuViewUnits, 'menu_view_units');
CreateMenuItem(ParentMI,itmViewForms,'itmViewForms',lisMenuViewForms, 'menu_view_forms');
CreateMenuItem(ParentMI,itmViewUnitDependencies,'itmViewUnitDependencies',lisMenuViewUnitDependencies);
CreateMenuItem(ParentMI,itmViewUnitInfo,'itmViewUnitInfo',lisMenuViewUnitInfo, 'menu_view_unit_info');
CreateMenuItem(ParentMI,itmViewToggleFormUnit,'itmViewToggleFormUnit',lisMenuViewToggleFormUnit, 'menu_view_toggle_form_unit');
CreateMenuSeparatorSection(mnuView,itmViewSecondaryWindows,'itmViewSecondaryWindows');
ParentMI:=itmViewSecondaryWindows;
CreateMenuItem(ParentMI,itmViewSearchResults,'itmViewSearchResults',lisMenuViewSearchResults);
CreateMenuItem(ParentMI,itmViewAnchorEditor,'itmViewAnchorEditor',lisMenuViewAnchorEditor,'menu_view_anchor_editor');
CreateMenuItem(ParentMI,itmViewComponentPalette,'itmViewComponentPalette',lisMenuViewComponentPalette, '', true, EnvironmentOptions.ComponentPaletteVisible);
CreateMenuItem(ParentMI,itmViewIDESpeedButtons,'itmViewIDESpeedButtons',lisMenuViewIDESpeedButtons, '', true, EnvironmentOptions.IDESpeedButtonsVisible);
CreateMenuSubSection(ParentMI,itmViewDebugWindows,'itmViewDebugWindows',lisMenuDebugWindows,'debugger');
begin
CreateMenuItem(itmViewDebugWindows,itmViewWatches,'itmViewWatches',lisMenuViewWatches,'debugger_watches');
CreateMenuItem(itmViewDebugWindows,itmViewBreakPoints,'itmViewBreakPoints',lisMenuViewBreakPoints,'debugger_breakpoints');
CreateMenuItem(itmViewDebugWindows,itmViewLocals,'itmViewLocals',lisMenuViewLocalVariables);
CreateMenuItem(itmViewDebugWindows,itmViewRegisters,'itmViewRegisters',lisMenuViewRegisters);
CreateMenuItem(itmViewDebugWindows,itmViewCallStack,'itmViewCallStack',lisMenuViewCallStack,'debugger_call_stack');
CreateMenuItem(itmViewDebugWindows,itmViewAssembler,'itmViewAssembler',lisMenuViewAssembler);
CreateMenuItem(itmViewDebugWindows,itmViewDebugEvents,'itmViewDebugEvents',lisMenuViewDebugEvents,''{'debugger_events'});
CreateMenuItem(itmViewDebugWindows,itmViewDebugOutput,'itmViewDebugOutput',lisMenuViewDebugOutput,'debugger_output');
end;
CreateMenuSubSection(ParentMI, itmViewIDEInternalsWindows, 'itmViewIDEInternalsWindows', lisMenuIDEInternals);
begin
CreateMenuItem(itmViewIDEInternalsWindows, itmViewPackageLinks, 'itmViewPackageLinks', lisMenuPackageLinks);
CreateMenuItem(itmViewIDEInternalsWindows, itmViewFPCInfo, 'itmViewFPCInfo', lisMenuAboutFPC);
CreateMenuItem(itmViewIDEInternalsWindows, itmViewIDEInfo, 'itmViewIDEInfo', lisAboutIDE);
end;
end;
end;
procedure TMainIDEBase.SetupProjectMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuProject,itmProjectNewSection,'itmProjectNewSection');
ParentMI:=itmProjectNewSection;
CreateMenuItem(ParentMI,itmProjectNew,'itmProjectNew',lisMenuNewProject, 'item_project');
CreateMenuItem(ParentMI,itmProjectNewFromFile,'itmProjectNewFromFile',lisMenuNewProjectFromFile, 'menu_project_from_file');
CreateMenuSeparatorSection(mnuProject,itmProjectOpenSection,'itmProjectOpenSection');
ParentMI:=itmProjectOpenSection;
CreateMenuItem(ParentMI,itmProjectOpen,'itmProjectOpen',lisMenuOpenProject,'menu_project_open');
CreateMenuSubSection(ParentMI,itmProjectRecentOpen,'itmProjectRecentOpen',lisMenuOpenRecentProject);
CreateMenuItem(ParentMI,itmProjectClose,'itmProjectClose',lisMenuCloseProject, 'menu_project_close');
CreateMenuSeparatorSection(mnuProject,itmProjectSaveSection,'itmProjectSaveSection');
ParentMI:=itmProjectSaveSection;
CreateMenuItem(ParentMI,itmProjectSave,'itmProjectSave',lisMenuSaveProject, 'menu_project_save');
CreateMenuItem(ParentMI,itmProjectSaveAs,'itmProjectSaveAs',lisMenuSaveProjectAs, 'menu_project_saveas');
CreateMenuItem(ParentMI,itmProjectPublish,'itmProjectPublish',lisMenuPublishProject);
CreateMenuSeparatorSection(mnuProject,itmProjectWindowSection,'itmProjectWindowSection');
ParentMI:=itmProjectWindowSection;
CreateMenuItem(ParentMI,itmProjectInspector,'itmProjectInspector',lisMenuProjectInspector,'menu_project_inspector');
CreateMenuItem(ParentMI,itmProjectOptions,'itmProjectOptions',lisMenuProjectOptions,'menu_project_options');
CreateMenuSeparatorSection(mnuProject,itmProjectAddRemoveSection,'itmProjectAddRemoveSection');
ParentMI:=itmProjectAddRemoveSection;
CreateMenuItem(ParentMI,itmProjectAddTo,'itmProjectAddTo',lisMenuAddToProject, 'menu_project_add');
CreateMenuItem(ParentMI,itmProjectRemoveFrom,'itmProjectRemoveFrom',lisMenuRemoveFromProject, 'menu_project_remove');
CreateMenuItem(ParentMI,itmProjectViewSource,'itmProjectViewSource',lisMenuViewSource, 'menu_project_viewsource');
end;
end;
procedure TMainIDEBase.SetupRunMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuRun,itmRunBuilding,'itmRunBuilding');
ParentMI:=itmRunBuilding;
CreateMenuItem(ParentMI,itmRunMenuBuild,'itmRunMenuBuild',lisMenuBuild,'menu_build');
CreateMenuItem(ParentMI,itmRunMenuBuildAll,'itmRunMenuBuildAll',lisMenuBuildAll,'menu_build_all');
CreateMenuItem(ParentMI,itmRunMenuQuickCompile,'itmRunMenuQuickCompile',lisMenuQuickCompile,'menu_quick_compile');
CreateMenuItem(ParentMI,itmRunMenuAbortBuild,'itmRunMenuAbortBuild',lisMenuAbortBuild,'menu_abort_build');
CreateMenuSeparatorSection(mnuRun,itmRunnning,'itmRunnning');
ParentMI:=itmRunnning;
CreateMenuItem(ParentMI,itmRunMenuRun,'itmRunMenuRun',lisMenuProjectRun,'menu_run');
CreateMenuItem(ParentMI,itmRunMenuPause,'itmRunMenuPause',lisMenuPause,'menu_pause', False);
CreateMenuItem(ParentMI,itmRunMenuShowExecutionPoint,'itmRunMenuShowExecutionPoint',
lisMenuShowExecutionPoint,'debugger_show_execution_point', False);
CreateMenuItem(ParentMI,itmRunMenuStepInto,'itmRunMenuStepInto',lisMenuStepInto,'menu_stepinto');
CreateMenuItem(ParentMI,itmRunMenuStepOver,'itmRunMenuStepOver',lisMenuStepOver,'menu_stepover');
CreateMenuItem(ParentMI,itmRunMenuStepOut,'itmRunMenuStepOut',lisMenuStepOut,'menu_stepout');
CreateMenuItem(ParentMI,itmRunMenuRunToCursor,'itmRunMenuRunToCursor',lisMenuRunToCursor,'menu_run_cursor');
CreateMenuItem(ParentMI,itmRunMenuStop,'itmRunMenuStop',lisMenuStop,'menu_stop', False);
CreateMenuItem(ParentMI,itmRunMenuRunParameters,'itmRunMenuRunParameters',lisMenuRunParameters, 'menu_run_parameters');
CreateMenuItem(ParentMI,itmRunMenuResetDebugger,'itmRunMenuResetDebugger',lisMenuResetDebugger, 'menu_reset_debugger');
CreateMenuSeparatorSection(mnuRun,itmRunBuildingFile,'itmRunBuildingFile');
ParentMI:=itmRunBuildingFile;
CreateMenuItem(ParentMI,itmRunMenuBuildFile,'itmRunMenuBuildFile',lisMenuBuildFile, 'menu_build_file');
CreateMenuItem(ParentMI,itmRunMenuRunFile,'itmRunMenuRunFile',lisMenuRunFile,'menu_run_file');
CreateMenuItem(ParentMI,itmRunMenuConfigBuildFile,'itmRunMenuConfigBuildFile',lisMenuConfigBuildFile, 'menu_build_run_file');
CreateMenuSeparatorSection(mnuRun,itmRunDebugging,'itmRunDebugging');
ParentMI:=itmRunDebugging;
CreateMenuItem(ParentMI,itmRunMenuInspect,'itmRunMenuInspect',lisMenuInspect, 'debugger_inspect', False);
CreateMenuItem(ParentMI,itmRunMenuEvaluate,'itmRunMenuEvaluate',lisMenuEvaluate, 'debugger_modify', False);
CreateMenuItem(ParentMI,itmRunMenuAddWatch,'itmRunMenuAddWatch',lisMenuAddWatch, '', False);
CreateMenuSubSection(ParentMI,itmRunMenuAddBreakpoint,'itmRunMenuAddBreakpoint',lisMenuAddBreakpoint, '');
CreateMenuItem(itmRunMenuAddBreakpoint,itmRunMenuAddBPSource,'itmRunMenuAdddBPSource',lisMenuAddBPSource, '', False);
end;
end;
procedure TMainIDEBase.SetupComponentsMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuComponent,itmPkgOpening,'itmPkgOpening');
ParentMI:=itmPkgOpening;
CreateMenuItem(ParentMI,itmPkgNewPackage,'itmPkgNewPackage',lisMenuNewPackage);
CreateMenuItem(ParentMI,itmPkgOpenPackage,'itmPkgOpenPackage',lisMenuOpenPackage,'pkg_installed');
CreateMenuItem(ParentMI,itmPkgOpenPackageFile,'itmPkgOpenPackageFile',lisMenuOpenPackageFile,'pkg_open');
CreateMenuItem(ParentMI,itmPkgOpenPackageOfCurUnit,'itmPkgOpenPackageOfCurUnit',lisMenuOpenPackageOfCurUnit);
CreateMenuSubSection(ParentMI,itmPkgOpenRecent,'itmPkgOpenRecent',lisMenuOpenRecentPkg);
CreateMenuSeparatorSection(mnuComponent,itmPkgUnits,'itmPkgUnits');
ParentMI:=itmPkgUnits;
CreateMenuItem(ParentMI,itmPkgAddCurUnitToPkg,'itmPkgAddCurUnitToPkg',lisMenuAddCurUnitToPkg,'pkg_add');
CreateMenuSeparatorSection(mnuComponent,itmPkgGraphSection,'itmPkgGraphSection');
ParentMI:=itmPkgGraphSection;
CreateMenuItem(ParentMI,itmPkgPkgGraph,'itmPkgPkgGraph',lisMenuPackageGraph,'pkg_graph');
CreateMenuItem(ParentMI,itmPkgEditInstallPkgs,'itmPkgEditInstallPkgs',lisMenuEditInstallPkgs,'pkg_properties');
{$IFDEF CustomIDEComps}
CreateMenuItem(ParentMI,itmCompsConfigCustomComps,'itmCompsConfigCustomComps',lisMenuConfigCustomComps);
{$ENDIF}
end;
end;
procedure TMainIDEBase.SetupToolsMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuTools,itmCustomTools,'itmCustomTools');
ParentMI:=itmCustomTools;
CreateMenuItem(ParentMI,itmToolConfigure,'itmToolConfigure',lisMenuConfigExternalTools);
CreateMenuSeparatorSection(mnuTools,itmCodeToolChecks,'itmCodeToolChecks');
ParentMI:=itmCodeToolChecks;
CreateMenuItem(ParentMI,itmToolSyntaxCheck,'itmToolSyntaxCheck',lisMenuQuickSyntaxCheck, 'menu_tool_syntax_check');
CreateMenuItem(ParentMI,itmToolGuessUnclosedBlock,'itmToolGuessUnclosedBlock',lisMenuGuessUnclosedBlock);
CreateMenuItem(ParentMI,itmToolGuessMisplacedIFDEF,'itmToolGuessMisplacedIFDEF',lisMenuGuessMisplacedIFDEF);
CreateMenuSeparatorSection(mnuTools,itmSecondaryTools,'itmSecondaryTools');
ParentMI:=itmSecondaryTools;
CreateMenuItem(ParentMI,itmToolMakeResourceString,'itmToolMakeResourceString',lisMenuMakeResourceString, 'menu_tool_make_resourcestring');
CreateMenuItem(ParentMI,itmToolDiff,'itmToolDiff',lisMenuDiff, 'menu_tool_diff');
CreateMenuSeparatorSection(mnuTools,itmDelphiConversion,'itmDelphiConversion');
ParentMI:=itmDelphiConversion;
CreateMenuItem(ParentMI,itmToolCheckLFM,'itmToolCheckLFM',lisMenuCheckLFM, 'menu_tool_check_lfm');
CreateMenuItem(ParentMI,itmToolConvertDelphiUnit,'itmToolConvertDelphiUnit',lisMenuConvertDelphiUnit,'menu_tool_dfm_to_lfm');
CreateMenuItem(ParentMI,itmToolConvertDelphiProject,'itmToolConvertDelphiProject',lisMenuConvertDelphiProject,'menu_tool_dfm_to_lfm');
CreateMenuItem(ParentMI,itmToolConvertDelphiPackage,'itmToolConvertDelphiPackage',lisMenuConvertDelphiPackage,'menu_tool_dfm_to_lfm');
CreateMenuItem(ParentMI,itmToolConvertDFMtoLFM,'itmToolConvertDFMtoLFM',lisMenuConvertDFMtoLFM,'menu_tool_dfm_to_lfm');
CreateMenuItem(ParentMI,itmToolConvertEncoding,'itmToolConvertEncoding',lisMenuConvertEncoding);
CreateMenuSeparatorSection(mnuTools,itmBuildingLazarus,'itmBuildingLazarus');
ParentMI:=itmBuildingLazarus;
CreateMenuItem(ParentMI,itmToolBuildLazarus,'itmToolBuildLazarus',lisMenuBuildLazarus,'menu_build_lazarus');
CreateMenuItem(ParentMI,itmToolConfigureBuildLazarus,'itmToolConfigureBuildLazarus',lisMenuConfigureBuildLazarus, 'menu_configure_build_lazarus');
end;
end;
procedure TMainIDEBase.SetupEnvironmentMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuEnvironment,itmOptionsDialogs,'itmOptionsDialogs');
ParentMI:=itmOptionsDialogs;
CreateMenuItem(ParentMI,itmEnvGeneralOptions,'itmEnvGeneralOptions',
lisMenuGeneralOptions,'menu_environment_options');
CreateMenuItem(ParentMI,itmEnvCodeTemplates,'itmEnvCodeTemplates',
lisMenuEditCodeTemplates,'');
CreateMenuItem(ParentMI,itmEnvCodeToolsDefinesEditor,
'itmEnvCodeToolsDefinesEditor',lisMenuCodeToolsDefinesEditor,
'menu_codetoolsdefineseditor');
CreateMenuSeparatorSection(mnuEnvironment,itmIDECacheSection,'itmIDECacheSection');
ParentMI:=itmIDECacheSection;
CreateMenuItem(ParentMI,itmEnvRescanFPCSrcDir,'itmEnvRescanFPCSrcDir',
lisMenuRescanFPCSourceDirectory);
end;
end;
procedure TMainIDEBase.SetupWindowsMenu;
begin
end;
procedure TMainIDEBase.SetupHelpMenu;
var
ParentMI: TIDEMenuSection;
begin
with MainIDEBar do begin
CreateMenuSeparatorSection(mnuHelp,itmOnlineHelps,'itmOnlineHelps');
ParentMI:=itmOnlineHelps;
CreateMenuItem(ParentMI,itmHelpOnlineHelp,'itmHelpOnlineHelp',
lisMenuOnlineHelp, 'menu_help');
CreateMenuItem(ParentMI,itmHelpReportingBug,'itmHelpReportingBug',
lisMenuReportingBug, 'menu_reportingbug');
// old behavior restored, until Tiger issue is fixed.
// http://bugs.freepascal.org/view.php?id=14411
(*
{$ifdef LCLCarbon}
// under Carbon: add About item to the Apple menu
CreateMenuItem(mnuApple, itmHelpAboutLazarus,'itmHelpAboutLazarus',
lisAboutLazarus, 'menu_information');
CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
{$else}*)
// otherwise: add About item to the Help menu
CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
ParentMI:=itmInfoHelps;
CreateMenuItem(ParentMI,itmHelpAboutLazarus,'itmHelpAboutLazarus',
lisAboutLazarus, 'menu_information');
//{$endif}
CreateMenuSeparatorSection(mnuHelp,itmHelpTools,'itmHelpTools');
ParentMI:=itmHelpTools;
end;
end;
procedure TMainIDEBase.LoadMenuShortCuts;
function GetCommand(ACommand: word): TIDECommand;
begin
Result:=IDECommandList.FindIDECommand(ACommand);
end;
begin
with MainIDEBar do begin
// file menu
itmFileNewUnit.Command:=GetCommand(ecNewUnit);
itmFileNewForm.Command:=GetCommand(ecNewForm);
itmFileNewOther.Command:=GetCommand(ecNew);
itmFileOpen.Command:=GetCommand(ecOpen);
itmFileRevert.Command:=GetCommand(ecRevert);
itmFileSave.Command:=GetCommand(ecSave);
itmFileSaveAs.Command:=GetCommand(ecSaveAs);
itmFileSaveAll.Command:=GetCommand(ecSaveAll);
itmFileClose.Command:=GetCommand(ecClose);
itmFileCloseAll.Command:=GetCommand(ecCloseAll);
itmFileCleanDirectory.Command:=GetCommand(ecCleanDirectory);
itmFileQuit.Command:=GetCommand(ecQuit);
itmFileQuit.Command:=GetCommand(ecQuit);
// edit menu
itmEditUndo.Command:=GetCommand(ecUndo);
itmEditRedo.Command:=GetCommand(ecRedo);
itmEditCut.Command:=GetCommand(ecCut);
itmEditCopy.Command:=GetCommand(ecCopy);
itmEditPaste.Command:=GetCommand(ecPaste);
itmEditIndentBlock.Command:=GetCommand(ecBlockIndent);
itmEditUnindentBlock.Command:=GetCommand(ecBlockUnindent);
itmEditEncloseBlock.Command:=GetCommand(ecSelectionEnclose);
itmEditUpperCaseBlock.Command:=GetCommand(ecSelectionUpperCase);
itmEditLowerCaseBlock.Command:=GetCommand(ecSelectionLowerCase);
itmEditTabsToSpacesBlock.Command:=GetCommand(ecSelectionTabs2Spaces);
itmEditCommentBlock.Command:=GetCommand(ecSelectionComment);
itmEditUncommentBlock.Command:=GetCommand(ecSelectionUncomment);
itmEditToggleComment.Command:=GetCommand(ecToggleComment);
itmEditConditionalBlock.Command:=GetCommand(ecSelectionConditional);
itmEditSortBlock.Command:=GetCommand(ecSelectionSort);
itmEditSelectionBreakLines.Command:=GetCommand(ecSelectionBreakLines);
itmEditSelectAll.Command:=GetCommand(ecSelectAll);
itmEditSelectToBrace.Command:=GetCommand(ecSelectToBrace);
itmEditSelectCodeBlock.Command:=GetCommand(ecSelectCodeBlock);
itmEditSelectLine.Command:=GetCommand(ecSelectLine);
itmEditSelectParagraph.Command:=GetCommand(ecSelectParagraph);
itmEditCompleteCode.Command:=GetCommand(ecCompleteCode);
itmEditExtractProc.Command:=GetCommand(ecExtractProc);
itmEditInsertCVSAuthor.Command:=GetCommand(ecInsertCVSAuthor);
itmEditInsertCVSDate.Command:=GetCommand(ecInsertCVSDate);
itmEditInsertCVSHeader.Command:=GetCommand(ecInsertCVSHeader);
itmEditInsertCVSID.Command:=GetCommand(ecInsertCVSID);
itmEditInsertCVSLog.Command:=GetCommand(ecInsertCVSLog);
itmEditInsertCVSName.Command:=GetCommand(ecInsertCVSName);
itmEditInsertCVSRevision.Command:=GetCommand(ecInsertCVSRevision);
itmEditInsertCVSSource.Command:=GetCommand(ecInsertCVSSource);
itmEditInsertGPLNotice.Command:=GetCommand(ecInsertGPLNotice);
itmEditInsertLGPLNotice.Command:=GetCommand(ecInsertLGPLNotice);
itmEditInsertModifiedLGPLNotice.Command:=GetCommand(ecInsertModifiedLGPLNotice);
itmEditInsertUsername.Command:=GetCommand(ecInsertUserName);
itmEditInsertDateTime.Command:=GetCommand(ecInsertDateTime);
itmEditInsertChangeLogEntry.Command:=GetCommand(ecInsertChangeLogEntry);
itmEditInsertGUID.Command:=GetCommand(ecInsertGUID);
// search menu
itmSearchFind.Command:=GetCommand(ecFind);
itmSearchFindNext.Command:=GetCommand(ecFindNext);
itmSearchFindPrevious.Command:=GetCommand(ecFindPrevious);
itmSearchFindInFiles.Command:=GetCommand(ecFindInFiles);
itmSearchFindIdentifierRefs.Command:=GetCommand(ecFindIdentifierRefs);
itmSearchReplace.Command:=GetCommand(ecReplace);
itmSearchRenameIdentifier.Command:=GetCommand(ecRenameIdentifier);
itmIncrementalFind.Command:=GetCommand(ecIncrementalFind);
itmGotoLine.Command:=GetCommand(ecGotoLineNumber);
itmJumpBack.Command:=GetCommand(ecJumpBack);
itmJumpForward.Command:=GetCommand(ecJumpForward);
itmAddJumpPoint.Command:=GetCommand(ecAddJumpPoint);
itmJumpToNextError.Command:=GetCommand(ecJumpToNextError);
itmJumpToPrevError.Command:=GetCommand(ecJumpToPrevError);
itmSetFreeBookmark.Command:=GetCommand(ecSetFreeBookmark);
itmJumpToNextBookmark.Command:=GetCommand(ecNextBookmark);
itmJumpToPrevBookmark.Command:=GetCommand(ecPrevBookmark);
itmFindBlockOtherEnd.Command:=GetCommand(ecFindBlockOtherEnd);
itmFindBlockStart.Command:=GetCommand(ecFindBlockStart);
itmFindDeclaration.Command:=GetCommand(ecFindDeclaration);
itmOpenFileAtCursor.Command:=GetCommand(ecOpenFileAtCursor);
itmGotoIncludeDirective.Command:=GetCommand(ecGotoIncludeDirective);
itmSearchProcedureList.Command:=GetCommand(ecProcedureList);
// view menu
itmViewInspector.Command:=GetCommand(ecToggleObjectInsp);
itmViewSourceEditor.Command:=GetCommand(ecToggleSourceEditor);
itmViewUnits.Command:=GetCommand(ecViewUnits);
itmViewCodeExplorer.Command:=GetCommand(ecToggleCodeExpl);
itmViewFPDocEditor.Command:=GetCommand(ecToggleFPDocEditor);
itmViewCodeBrowser.Command:=GetCommand(ecToggleCodeBrowser);
itmViewRestrictionBrowser.Command:=GetCommand(ecToggleRestrictionBrowser);
itmViewComponents.Command:=GetCommand(ecViewComponents);
itmViewUnitDependencies.Command:=GetCommand(ecViewUnitDependencies);
itmViewUnitInfo.Command:=GetCommand(ecViewUnitInfo);
itmViewForms.Command:=GetCommand(ecViewForms);
itmViewToggleFormUnit.Command:=GetCommand(ecToggleFormUnit);
itmViewMessage.Command:=GetCommand(ecToggleMessages);
itmViewSearchResults.Command:=GetCommand(ecToggleSearchResults);
itmViewAnchorEditor.Command:=GetCommand(ecViewAnchorEditor);
itmViewComponentPalette.Command:=GetCommand(ecToggleCompPalette);
itmViewIDESpeedButtons.Command:=GetCommand(ecToggleIDESpeedBtns);
itmJumpHistory.Command:=GetCommand(ecViewJumpHistory);
//itmViewPackageLinks.Command:=GetCommand(ec?);
// project menu
itmProjectNew.Command:=GetCommand(ecNewProject);
itmProjectNewFromFile.Command:=GetCommand(ecNewProjectFromFile);
itmProjectOpen.Command:=GetCommand(ecOpenProject);
itmProjectClose.Command:=GetCommand(ecCloseProject);
itmProjectSave.Command:=GetCommand(ecSaveProject);
itmProjectSaveAs.Command:=GetCommand(ecSaveProjectAs);
itmProjectPublish.Command:=GetCommand(ecPublishProject);
itmProjectInspector.Command:=GetCommand(ecProjectInspector);
itmProjectOptions.Command:=GetCommand(ecProjectOptions);
itmProjectAddTo.Command:=GetCommand(ecAddCurUnitToProj);
itmProjectRemoveFrom.Command:=GetCommand(ecRemoveFromProj);
itmProjectViewSource.Command:=GetCommand(ecViewProjectSource);
// run menu
itmRunMenuBuild.Command:=GetCommand(ecBuild);
itmRunMenuBuildAll.Command:=GetCommand(ecBuildAll);
itmRunMenuQuickCompile.Command:=GetCommand(ecQuickCompile);
itmRunMenuAbortBuild.Command:=GetCommand(ecAbortBuild);
itmRunMenuRun.Command:=GetCommand(ecRun);
itmRunMenuPause.Command:=GetCommand(ecPause);
itmRunMenuStepInto.Command:=GetCommand(ecStepInto);
itmRunMenuStepOver.Command:=GetCommand(ecStepOver);
itmRunMenuStepOut.Command:=GetCommand(ecStepOut);
itmRunMenuRunToCursor.Command:=GetCommand(ecRunToCursor);
itmRunMenuStop.Command:=GetCommand(ecStopProgram);
itmRunMenuResetDebugger.Command:=GetCommand(ecResetDebugger);
itmRunMenuRunParameters.Command:=GetCommand(ecRunParameters);
itmRunMenuBuildFile.Command:=GetCommand(ecBuildFile);
itmRunMenuRunFile.Command:=GetCommand(ecRunFile);
itmRunMenuConfigBuildFile.Command:=GetCommand(ecConfigBuildFile);
// components menu
itmPkgNewPackage.Command:=GetCommand(ecNewPackage);
itmPkgOpenPackage.Command:=GetCommand(ecOpenPackage);
itmPkgOpenPackageFile.Command:=GetCommand(ecOpenPackageFile);
itmPkgOpenPackageOfCurUnit.Command:=GetCommand(ecOpenPackageOfCurUnit);
itmPkgAddCurUnitToPkg.Command:=GetCommand(ecAddCurUnitToPkg);
itmPkgPkgGraph.Command:=GetCommand(ecPackageGraph);
itmPkgEditInstallPkgs.Command:=GetCommand(ecEditInstallPkgs);
{$IFDEF CustomIDEComps}
itmCompsConfigCustomComps.Command:=GetCommand(ecConfigCustomComps);
{$ENDIF}
// tools menu
itmToolConfigure.Command:=GetCommand(ecExtToolSettings);
itmToolSyntaxCheck.Command:=GetCommand(ecSyntaxCheck);
itmToolGuessUnclosedBlock.Command:=GetCommand(ecGuessUnclosedBlock);
itmToolGuessMisplacedIFDEF.Command:=GetCommand(ecGuessMisplacedIFDEF);
itmToolMakeResourceString.Command:=GetCommand(ecMakeResourceString);
itmToolDiff.Command:=GetCommand(ecDiff);
itmToolConvertDFMtoLFM.Command:=GetCommand(ecConvertDFM2LFM);
itmToolCheckLFM.Command:=GetCommand(ecCheckLFM);
itmToolConvertDelphiUnit.Command:=GetCommand(ecConvertDelphiUnit);
itmToolConvertDelphiProject.Command:=GetCommand(ecConvertDelphiProject);
itmToolConvertDelphiPackage.Command:=GetCommand(ecConvertDelphiPackage);
itmToolConvertEncoding.Command:=GetCommand(ecConvertEncoding);
itmToolBuildLazarus.Command:=GetCommand(ecBuildLazarus);
itmToolConfigureBuildLazarus.Command:=GetCommand(ecConfigBuildLazarus);
// environment menu
itmEnvGeneralOptions.Command:=GetCommand(ecEnvironmentOptions);
itmEnvCodeTemplates.Command:=GetCommand(ecEditCodeTemplates);
itmEnvCodeToolsDefinesEditor.Command:=GetCommand(ecCodeToolsDefinesEd);
itmEnvRescanFPCSrcDir.Command:=GetCommand(ecRescanFPCSrcDir);
// help menu
itmHelpAboutLazarus.Command:=GetCommand(ecAboutLazarus);
itmHelpOnlineHelp.Command:=GetCommand(ecOnlineHelp);
itmHelpReportingBug.Command:=GetCommand(ecReportingBug);
end;
end;
function TMainIDEBase.GetToolStatus: TIDEToolStatus;
begin
Result:=FToolStatus;
end;
function TMainIDEBase.DoOpenMacroFile(Sender: TObject; const AFilename: string
): TModalResult;
begin
Result:=DoOpenEditorFile(AFilename,-1,-1,
[ofOnlyIfExists,ofAddToRecent,ofRegularFile,ofConvertMacros]);
end;
procedure TMainIDEBase.UpdateWindowMenu(Immediately: boolean = false);
const
UpdatePause = 5/864000; // half a second
function GetMenuItem(Index: Integer): TIDEMenuItem; inline;
begin
if mnuWindow.Count > Index then
Result := mnuWindow.Items[Index]
else
Result := RegisterIDEMenuCommand(mnuWindow.GetPath,
'Window'+IntToStr(Index),'');
end;
var
WindowsList: TFPList;
i, ItemCount: Integer;
CurMenuItem: TIDEMenuItem;
AForm: TForm;
t: TDateTime;
begin
t:=Now;
if (not Immediately) then begin
if (FLastWindowMenuUpdate<>0) and (t-FLastWindowMenuUpdate<UpdatePause) then
exit;
end;
FLastWindowMenuUpdate:=t;
WindowsList:=TFPList.Create;
// add typical IDE windows at the start of the list
for i := 0 to SourceEditorManager.SourceWindowCount - 1 do
WindowsList.Add(SourceEditorManager.SourceWindows[i]);
if (ObjectInspector1<>nil) and (ObjectInspector1.Visible) then
WindowsList.Add(ObjectInspector1);
// add special IDE windows
for i:=0 to Screen.FormCount-1 do begin
AForm:=Screen.Forms[i];
//debugln(['TMainIDEBase.UpdateWindowMenu ',DbgSName(AForm),' Vis=',AForm.IsVisible,' Des=',DbgSName(AForm.Designer)]);
if (not AForm.IsVisible) or (AForm=MainIDEBar) or (AForm=SplashForm)
or (AForm.Designer<>nil) or (WindowsList.IndexOf(AForm)>=0) then
continue;
if IDEDockMaster<>nil then
begin
if not IDEDockMaster.AddableInWindowMenu(AForm) then continue;
end else begin
if AForm.Parent<>nil then continue;
end;
WindowsList.Add(AForm);
end;
// add designer forms and datamodule forms
for i:=0 to Screen.FormCount-1 do begin
AForm:=Screen.Forms[i];
if (AForm.Designer<>nil) and (WindowsList.IndexOf(AForm)<0) then
WindowsList.Add(AForm);
end;
// create menuitems
ItemCount := WindowsList.Count;
for i:=0 to WindowsList.Count-1 do
begin
CurMenuItem := GetMenuItem(i);
CurMenuItem.Caption:=TCustomForm(WindowsList[i]).Caption;
CurMenuItem.MenuItem.Checked := Screen.ActiveCustomForm = TCustomForm(WindowsList[i]);
CurMenuItem.OnClick:=@mnuWindowItemClick;
end;
//create source page menuitems
if (SourceEditorManager.SourceWindowCount > 0)
and not (nbcPageListPopup in SourceEditorManager.SourceWindows[0].GetCapabilities) then
begin
CurMenuItem := GetMenuItem(ItemCount);
CurMenuItem.OnClick:=nil;
CurMenuItem.Caption:='-';
inc(ItemCount);
for i := 0 to SourceEditorManager.SourceEditorCount - 1 do
begin
CurMenuItem := GetMenuItem(ItemCount);
CurMenuItem.Caption := SourceEditorManager.SourceEditors[i].PageName;
CurMenuItem.MenuItem.Checked := SourceEditorManager.ActiveEditor = SourceEditorManager.SourceEditors[i] ;
CurMenuItem.OnClick := @mnuWindowSourceItemClick;
CurMenuItem.Tag := i;
inc(ItemCount);
end;
end;
// remove unused menuitems
while mnuWindow.Count > ItemCount do
mnuWindow.Items[mnuWindow.Count-1].Free;
// clean up
WindowsList.Free;
end;
procedure TMainIDEBase.SetRecentSubMenu(Section: TIDEMenuSection;
FileList: TStringList; OnClickEvent: TNotifyEvent);
var
i: integer;
AMenuItem: TIDEMenuItem;
begin
// create enough menuitems
while Section.Count<FileList.Count do begin
AMenuItem:=RegisterIDEMenuCommand(Section.GetPath,
Section.Name+'Recent'+IntToStr(Section.Count),'');
end;
// delete unused menuitems
while Section.Count>FileList.Count do
Section.Items[Section.Count-1].Free;
Section.Enabled:=(Section.Count>0);
// set captions and event
for i:=0 to FileList.Count-1 do begin
AMenuItem:=Section.Items[i];
AMenuItem.Caption := FileList[i];
AMenuItem.OnClick := OnClickEvent;
end;
end;
procedure TMainIDEBase.UpdateHighlighters(Immediately: boolean = false);
var
ASrcEdit: TSourceEditor;
h: TLazSyntaxHighlighter;
i: Integer;
AnEditorInfo: TUnitEditorInfo;
begin
if Immediately then begin
FNeedUpdateHighlighters:=false;
Project1.UpdateAllSyntaxHighlighter;
for h := Low(TLazSyntaxHighlighter) to High(TLazSyntaxHighlighter) do
if Highlighters[h]<>nil then begin
Highlighters[h].BeginUpdate;
EditorOpts.GetHighlighterSettings(Highlighters[h]);
Highlighters[h].EndUpdate;
end;
for i := 0 to SourceEditorManager.SourceEditorCount - 1 do begin
ASrcEdit := SourceEditorManager.SourceEditors[i];
AnEditorInfo:=Project1.EditorInfoWithEditorComponent(ASrcEdit);
if AnEditorInfo <> nil then
ASrcEdit.SyntaxHighlighterType := AnEditorInfo.SyntaxHighlighter;
end;
end else begin
FNeedUpdateHighlighters:=true;
end;
end;
function TMainIDEBase.DoJumpToCodePosition(
ActiveSrcEdit: TSourceEditorInterface; ActiveUnitInfo: TUnitInfo;
NewSource: TCodeBuffer; NewX, NewY, NewTopLine: integer; AddJumpPoint: boolean;
MarkLine: Boolean): TModalResult;
var
SrcEdit: TSourceEditor;
begin
if ActiveSrcEdit = nil then
SrcEdit := nil
else
SrcEdit := ActiveSrcEdit as TSourceEditor;
Result := DoJumpToCodePos(SrcEdit as TSourceEditor, ActiveUnitInfo,
NewSource, NewX, NewY, NewTopLine, AddJumpPoint, MarkLine);
end;
procedure TMainIDEBase.FindInFilesPerDialog(AProject: TProject);
begin
FindInFilesDialog.FindInFilesPerDialog(AProject);
end;
procedure TMainIDEBase.FindInFiles(AProject: TProject; const FindText: string);
begin
FindInFilesDialog.FindInFiles(AProject, FindText);
end;
end.
|