IDE: moved todolist to package, todo list for packages needs to be done

git-svn-id: trunk@26151 -
This commit is contained in:
mattias 2010-06-16 11:53:34 +00:00
parent 915ade9ca1
commit e7db0d5bcd
38 changed files with 3629 additions and 196 deletions

15
.gitattributes vendored
View File

@ -2240,6 +2240,16 @@ components/tdbf/languages/registerdbf.zh_CN.po svneol=native#text/plain
components/tdbf/registerdbf.lrs svneol=native#text/pascal
components/tdbf/registerdbf.pas svneol=native#text/pascal
components/tdbf/tdbf.png -text svneol=unset#image/png
components/todolist/Makefile svneol=native#text/plain
components/todolist/Makefile.fpc svneol=native#text/plain
components/todolist/languages/todoliststrconsts.po svneol=native#text/plain
components/todolist/tododlg.lfm svneol=native#text/plain
components/todolist/tododlg.pas svneol=native#text/plain
components/todolist/todolist.lfm svneol=native#text/plain
components/todolist/todolist.pas svneol=native#text/pascal
components/todolist/todolistlaz.lpk svneol=native#text/plain
components/todolist/todolistlaz.pas svneol=native#text/plain
components/todolist/todoliststrconsts.pas svneol=native#text/plain
components/turbopower_ipro/Makefile svneol=native#text/plain
components/turbopower_ipro/Makefile.fpc svneol=native#text/plain
components/turbopower_ipro/design/Makefile svneol=native#text/plain
@ -3683,10 +3693,6 @@ ide/startlazarus.lpr svneol=native#text/pascal
ide/startlazarus.rc svneol=CRLF#text/plain eol=crlf
ide/sysvaruseroverridedlg.lfm svneol=native#text/plain
ide/sysvaruseroverridedlg.pas svneol=native#text/pascal
ide/tododlg.lfm svneol=native#text/plain
ide/tododlg.pas svneol=native#text/plain
ide/todolist.lfm svneol=native#text/plain
ide/todolist.pas svneol=native#text/pascal
ide/transfermacros.pp svneol=native#text/pascal
ide/unitdependencies.lfm svneol=native#text/plain
ide/unitdependencies.pas svneol=native#text/pascal
@ -5204,6 +5210,7 @@ packager/globallinks/simpleideintf-0.lpl svneol=native#text/plain
packager/globallinks/sqlite3laz-0.lpl svneol=native#text/plain
packager/globallinks/sqlitelaz-0.lpl svneol=native#text/plain
packager/globallinks/tachartlazaruspkg-0.lpl svneol=native#text/plain
packager/globallinks/todolistlaz-1.lpl svneol=native#text/plain
packager/globallinks/turbopoweripro-1.lpl svneol=native#text/plain
packager/globallinks/turbopoweriprodsgn-0.lpl svneol=native#text/plain
packager/globallinks/weblaz-0.lpl svneol=native#text/plain

View File

@ -1,10 +1,10 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/03/16]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/06/03]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
UNIXs = linux $(BSDs) solaris qnx haiku
LIMIT83fs = go32v2 os2 emx watcom
OSNeedsComspecToRunBatch = go32v2 watcom
FORCE:
@ -59,9 +59,11 @@ endif
endif
ifdef COMSPEC
ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
ifndef RUNBATCH
RUNBATCH=$(COMSPEC) /C
endif
endif
endif
ifdef inUnix
PATHSEP=/
else
@ -321,6 +323,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),i386-nativent)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_DIRS+=synedit codetools
endif
@ -384,6 +389,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_DIRS+=synedit codetools
endif
@ -435,6 +443,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override TARGET_DIRS+=synedit codetools
endif
ifeq ($(FULL_TARGET),i386-linux)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
@ -495,6 +506,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-nativent)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifeq ($(FULL_TARGET),m68k-linux)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
@ -558,6 +572,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
@ -609,6 +626,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override CLEAN_FILES+=$(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) $(wildcard ./units/$(CPU_TARGET)-$(OS_TARGET)/*$(RSTEXT)) $(wildcard ./custom/*$(OEXT)) $(wildcard ./custom/*$(PPUEXT)) $(wildcard ./custom/*$(RSTEXT))
endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@ -951,6 +971,10 @@ ifeq ($(OS_TARGET),symbian)
SHAREDLIBEXT=.dll
SHORTSUFFIX=symbian
endif
ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@ -1536,6 +1560,9 @@ endif
ifdef EXEFILES
override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
endif
ifdef CLEAN_PROGRAMS
override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
endif
ifdef CLEAN_UNITS
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
endif
@ -1582,6 +1609,9 @@ endif
ifdef CLEANRSTFILES
-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
endif
endif
ifdef CLEAN_FILES
-$(DEL) $(CLEAN_FILES)
endif
-$(DELTREE) units
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
@ -1785,6 +1815,10 @@ ifeq ($(FULL_TARGET),i386-symbian)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifeq ($(FULL_TARGET),i386-nativent)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifeq ($(FULL_TARGET),m68k-linux)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
@ -1869,6 +1903,10 @@ ifeq ($(FULL_TARGET),x86_64-freebsd)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
@ -1937,6 +1975,10 @@ ifeq ($(FULL_TARGET),armeb-embedded)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifeq ($(FULL_TARGET),mipsel-linux)
TARGET_DIRS_SYNEDIT=1
TARGET_DIRS_CODETOOLS=1
endif
ifdef TARGET_DIRS_SYNEDIT
synedit_all:
$(MAKE) -C synedit all
@ -2065,6 +2107,7 @@ bigidecomponents: all
$(MAKE) -C memds
$(MAKE) -C sdf
$(MAKE) -C tachart
$(MAKE) -C todolist
$(MAKE) -C jcf2/IdePlugin/lazarus
$(MAKE) -C chmhelp/packages/help
$(MAKE) -C chmhelp/packages/idehelp
@ -2088,6 +2131,7 @@ bigideclean:
$(MAKE) -C memds clean
$(MAKE) -C sdf clean
$(MAKE) -C tachart clean
$(MAKE) -C todolist clean
$(MAKE) -C jcf2/IdePlugin/lazarus clean
$(MAKE) -C chmhelp/packages/help clean
$(MAKE) -C chmhelp/packages/idehelp clean

View File

@ -34,6 +34,7 @@ bigidecomponents: all
$(MAKE) -C memds
$(MAKE) -C sdf
$(MAKE) -C tachart
$(MAKE) -C todolist
$(MAKE) -C jcf2/IdePlugin/lazarus
$(MAKE) -C chmhelp/packages/help
$(MAKE) -C chmhelp/packages/idehelp
@ -60,6 +61,7 @@ bigideclean:
$(MAKE) -C memds clean
$(MAKE) -C sdf clean
$(MAKE) -C tachart clean
$(MAKE) -C todolist clean
$(MAKE) -C jcf2/IdePlugin/lazarus clean
$(MAKE) -C chmhelp/packages/help clean
$(MAKE) -C chmhelp/packages/idehelp clean

2963
components/todolist/Makefile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
# File generated automatically by Lazarus Package Manager
#
# Makefile.fpc for ToDoListLaz 1.0.1
#
# This file was generated on 06/16/2010
[package]
name=todolistlaz
version=1.0.1
[compiler]
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)
unitdir=../codetools/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
includedir=./
options=-dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Scghi
[target]
units=todolistlaz.pas
[clean]
files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \
$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
[prerules]
# LCL Platform
ifndef LCL_PLATFORM
ifeq ($(OS_TARGET),win32)
LCL_PLATFORM=win32
else
ifeq ($(OS_TARGET),win64)
LCL_PLATFORM=win32
else
ifeq ($(OS_TARGET),darwin)
LCL_PLATFORM=carbon
else
LCL_PLATFORM=gtk2
endif
endif
endif
endif
export LCL_PLATFORM
[rules]
.PHONY: cleartarget all
cleartarget:
-$(DEL) $(COMPILER_UNITTARGETDIR)/todolistlaz$(PPUEXT)
all: cleartarget $(COMPILER_UNITTARGETDIR) todolistlaz$(PPUEXT)

View File

@ -0,0 +1,91 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: todoliststrconsts.dlgfropts
msgid "Options"
msgstr ""
#: todoliststrconsts.dlgunitdeprefresh
msgid "Refresh"
msgstr ""
#: todoliststrconsts.lisctinsertmacro
msgid "Insert Macro"
msgstr ""
#: todoliststrconsts.lispkgfiletypetext
msgid "Text"
msgstr ""
#: todoliststrconsts.lisprint
msgid "Print"
msgstr ""
#: todoliststrconsts.listddinserttodo
msgid "Insert ToDo"
msgstr ""
#: todoliststrconsts.listodoexport
msgid "Export"
msgstr ""
#: todoliststrconsts.listodogoto
msgid "Goto"
msgstr ""
#: todoliststrconsts.listodoldescription
msgid "Description"
msgstr ""
#: todoliststrconsts.listodoldone
msgid "Done"
msgstr ""
#: todoliststrconsts.listodolfile
msgid "Module"
msgstr ""
#: todoliststrconsts.listodolist
msgid "ToDo list"
msgstr ""
#: todoliststrconsts.listodolistcaption
msgid "ToDo List"
msgstr ""
#: todoliststrconsts.listodolistgotoline
msgid "Goto selected source line"
msgstr ""
#: todoliststrconsts.listodolistoptions
msgid "ToDo options..."
msgstr ""
#: todoliststrconsts.listodolistprintlist
msgid "Print todo items"
msgstr ""
#: todoliststrconsts.listodolistrefresh
msgid "Refresh todo items"
msgstr ""
#: todoliststrconsts.listodolline
msgid "Line"
msgstr ""
#: todoliststrconsts.listodolowner
msgid "Owner"
msgstr ""
#: todoliststrconsts.listodolpriority
msgid "Priority"
msgstr ""
#: todoliststrconsts.listtodolcategory
msgid "Category"
msgstr ""
#: todoliststrconsts.lisviewtodolist
msgid "View ToDo list"
msgstr ""

View File

@ -29,8 +29,9 @@ unit ToDoDlg;
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
TodoList, LazarusIDEStrConsts, Buttons, ButtonPanel;
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, TodoList, ToDoListStrConsts, Buttons, ButtonPanel, MenuIntf,
SrcEditorIntf, IDECommands, LCLType, IDEWindowIntf, LazIDEIntf;
type
@ -54,13 +55,90 @@ type
{ public declarations }
end;
var
InsertToDoCmd: TIDECommand;
ViewToDoListCmd: TIDECommand;
function ExecuteTodoDialog: TTodoItem;
procedure Register;
procedure InsertToDoForActiveSourceEditor(Sender: TObject);
procedure ViewToDoList(Sender: TObject);
procedure CreateIDEToDoWindow(Sender: TObject; aFormName: string;
var AForm: TCustomForm; DoDisableAutoSizing: boolean);
implementation
{$R *.lfm}
procedure Register;
var
Key: TIDEShortCut;
Cat: TIDECommandCategory;
begin
// mattias: move icon resource item_todo to package
// mattias: add package intf for files and main file
// mattias: add menu item to package editor
// mattias: test short cut
// register shortcut for insert todo
Key := IDEShortCut(VK_T,[ssCtrl,ssShift],VK_UNKNOWN,[]);
Cat:=IDECommandList.FindCategoryByName(CommandCategoryTextEditingName);
InsertToDoCmd:=RegisterIDECommand(Cat, 'Insert ToDo', lisTDDInsertToDo,Key,
nil,@InsertToDoForActiveSourceEditor);
// add a menu item in the source editor
RegisterIDEMenuCommand(SrcEditMenuSectionFirstStatic, 'InsertToDo',
lisTDDInsertToDo,nil,nil,InsertToDoCmd,'item_todo');
// add a menu item in the Edit / Insert Text section
RegisterIDEMenuCommand(itmEditInsertText,'itmEditInsertTodo',lisTDDInsertToDo,
nil,nil,InsertToDoCmd,'item_todo');
// register shortcut for view todo list
Key := IDEShortCut(VK_UNKNOWN,[],VK_UNKNOWN,[]);
Cat:=IDECommandList.FindCategoryByName(CommandCategoryViewName);
ViewToDoListCmd:=RegisterIDECommand(Cat, 'View ToDo list', lisViewToDoList,
Key,nil,@ViewToDoList);
// add a menu item in the view menu
RegisterIDEMenuCommand(itmViewMainWindows, 'ViewToDoList',
lisToDoList, nil, nil, ViewToDoListCmd, 'item_todo');
// register window creator
IDEWindowCreators.Add(ToDoWindowName,@CreateIDEToDoWindow,nil,'250','250','','');
end;
procedure InsertToDoForActiveSourceEditor(Sender: TObject);
var
SrcEdit: TSourceEditorInterface;
aTodoItem: TTodoItem;
begin
SrcEdit:=SourceEditorManagerIntf.ActiveEditor;
if SrcEdit=nil then exit;
if SrcEdit.ReadOnly then exit;
aTodoItem := ExecuteTodoDialog;
try
if Assigned(aTodoItem) then
SrcEdit.Selection:=aTodoItem.AsComment;
finally
aTodoItem.Free;
end;
end;
procedure ViewToDoList(Sender: TObject);
begin
IDEWindowCreators.ShowForm(ToDoWindowName,true);
end;
procedure CreateIDEToDoWindow(Sender: TObject; aFormName: string;
var AForm: TCustomForm; DoDisableAutoSizing: boolean);
begin
if CompareText(aFormName,ToDoWindowName)<>0 then exit;
IDEWindowCreators.CreateForm(IDETodoWindow,TIDETodoWindow,DoDisableAutoSizing,
LazarusIDE.OwningComponent);
AForm:=IDETodoWindow;
end;
{ TTodoDialog }
procedure TTodoDialog.PriorityEditKeyPress(Sender: TObject; var Key: char);

View File

@ -10,6 +10,7 @@ object IDETodoWindow: TIDETodoWindow
KeyPreview = True
OnCreate = FormCreate
OnKeyDown = FormKeyDown
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '0.9.29'
object StatusBar: TStatusBar

View File

@ -64,13 +64,13 @@ uses
// FCL, LCL
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs,
StrUtils, ExtCtrls, ComCtrls, Menus, Buttons, GraphType, ActnList, AvgLvlTree,
StdCtrls, LCLIntf, LCLType,
LCLIntf, LCLType,
// Codetools
CodeAtom, CodeCache, CodeToolManager, BasicCodeTools, FileProcs,
// IDEIntf
LazIDEIntf, IDEImagesIntf, PackageIntf, ProjectIntf,
// IDE
LazarusIDEStrConsts, PackageDefs;
ToDoListStrConsts;
Const
@ -154,16 +154,19 @@ type
procedure acRefreshExecute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift:TShiftState);
procedure FormShow(Sender: TObject);
procedure lvTodoClick(Sender: TObject);
procedure SaveDialog1Show(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
private
fBuild : Boolean;
FIdleConnected: boolean;
fMainSourceFilename : String;
FOnOpenFile : TOnOpenFile;
fRootCBuffer : TCodeBuffer;
fScannedFiles: TAvgLvlTree;// tree of TTLScannedFile
procedure SetIdleConnected(const AValue: boolean);
procedure SetMainSourceFilename(const AValue: String);
function CreateToDoItem(aTLFile: TTLScannedFile;
@ -172,18 +175,19 @@ type
procedure AddListItem(aTodoItem: TTodoItem);
procedure ScanFile(aFileName : string);
procedure OnIdle(Sender: TObject; var Done: Boolean);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property MainSourceFilename : String read fMainSourceFilename write SetMainSourceFilename;
property OnOpenFile: TOnOpenFile read FOnOpenFile write FOnOpenFile;
property IdleConnected: boolean read FIdleConnected write SetIdleConnected;
end;
var
IDETodoWindow: TIDETodoWindow;
procedure CreateTodoWindow;
function IsToDoComment(const Src: string;
CommentStartPos, CommentEndPos: integer): boolean;
function GetToDoComment(const Src: string;
@ -206,12 +210,6 @@ begin
TTLScannedFile(ScannedFile).Filename);
end;
procedure CreateTodoWindow;
begin
if IDETodoWindow=nil then
IDETodoWindow:=TIDETodoWindow.Create(LazarusIDE.OwningComponent);
end;
function IsToDoComment(const Src: string;
CommentStartPos, CommentEndPos: integer): boolean;
var
@ -299,10 +297,16 @@ end;
procedure TIDETodoWindow.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key=VK_ESCAPE then
if Shift=[] then ;
if (Key=VK_ESCAPE) then
ModalResult:=mrCancel;
end;
procedure TIDETodoWindow.FormShow(Sender: TObject);
begin
IdleConnected:=true;
end;
procedure TIDETodoWindow.lvTodoClick(Sender: TObject);
begin
acGoto.Execute;
@ -310,7 +314,7 @@ end;
procedure TIDETodoWindow.SaveDialog1Show(Sender: TObject);
begin
SaveDialog1.InitialDir:=GetCurrentDirUTF8;
SaveDialog1.InitialDir:=GetCurrentDirUTF8;
end;
procedure TIDETodoWindow.ToolButton1Click(Sender: TObject);
@ -327,6 +331,16 @@ begin
acRefresh.Execute;
end;
procedure TIDETodoWindow.SetIdleConnected(const AValue: boolean);
begin
if FIdleConnected=AValue then exit;
FIdleConnected:=AValue;
if IdleConnected then
Application.AddOnIdleHandler(@OnIdle)
else
Application.RemoveOnIdleHandler(@OnIdle);
end;
function TIDETodoWindow.CreateToDoItem(aTLFile: TTLScannedFile;
const aFileName: string; const SComment, EComment: string;
const TokenString: string; LineNumber: Integer): TTodoItem;
@ -532,6 +546,8 @@ begin
begin
fRootCBuffer:=CodeToolBoss.LoadFile(fMainSourceFilename,false,false);
if not Assigned(fRootCBuffer) then Exit;
UsedInterfaceFilenames:=nil;
UsedImplementationFilenames:=nil;
if CodeToolBoss.FindUsedUnitFiles(fRootCBuffer,UsedInterfaceFilenames,
UsedImplementationFilenames) then
begin
@ -615,9 +631,8 @@ var
Owners: TFPList;
CurOwner: TObject;
CurProject: TLazProject;
CurPackage: TLazPackage;
CurPackage: TIDEPackage;
CurProjFile: TLazProjectFile;
CurPkgFile: TPkgFile;
Node: TAvgLvlTreeNode;
CurFile: TTLScannedFile;
begin
@ -665,15 +680,15 @@ begin
break;
end;
CurProject:=nil;
end else if CurOwner is TLazPackage then begin
end else if CurOwner is TIDEPackage then begin
// this file is owned by a package
CurPackage:=TLazPackage(CurOwner);
if (CurPackage.GetSrcFilename<>'')
CurPackage:=TIDEPackage(CurOwner);
{if (CurPackage.GetSrcFilename<>'')
and (CompareFilenames(CurPackage.GetSrcFilename,MainSourceFilename)=0)
then begin
// create the list of todo items for this package
break;
end;
end;}
CurPackage:=nil;
end;
inc(i);
@ -693,11 +708,11 @@ begin
end;
if CurPackage<>nil then begin
// scan all units of package
for i:=0 to CurPackage.FileCount-1 do begin
{for i:=0 to CurPackage.FileCount-1 do begin
CurPkgFile:=CurPackage.Files[i];
if FilenameIsPascalUnit(CurPkgFile.Filename) then
ScanFile(CurPkgFile.Filename);
end;
end;}
end;
Node:=fScannedFiles.FindLowest;
@ -806,6 +821,21 @@ begin
until false;
end;
procedure TIDETodoWindow.OnIdle(Sender: TObject; var Done: Boolean);
var
AProject: TLazProject;
MainFile: TLazProjectFile;
begin
if Done then ;
IdleConnected:=false;
if MainSourceFilename<>'' then exit;
AProject:=LazarusIDE.ActiveProject;
if AProject=nil then exit;
MainFile:=AProject.MainFile;
if MainFile=nil then exit;
MainSourceFilename:=MainFile.Filename;
end;
{ TTodoItem }
function TTodoItem.GetAsString: string;

View File

@ -0,0 +1,74 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="3">
<Name Value="ToDoListLaz"/>
<Author Value="Olivier GUILBAUD <golivier@free.fr>, Gerard Visent <gerardusmercator@gmail.com>, Mattias Gaertner, Alexander du Plessis
"/>
<CompilerOptions>
<Version Value="8"/>
<SearchPaths>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="True"/>
</SyntaxOptions>
</Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="A todo list window for the Lazarus IDE
"/>
<License Value="GPL-2
"/>
<Version Major="1" Release="1"/>
<Files Count="5">
<Item1>
<Filename Value="tododlg.lfm"/>
<Type Value="LFM"/>
</Item1>
<Item2>
<Filename Value="tododlg.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="ToDoDlg"/>
</Item2>
<Item3>
<Filename Value="todolist.lfm"/>
<Type Value="LFM"/>
</Item3>
<Item4>
<Filename Value="todolist.pas"/>
<UnitName Value="TodoList"/>
</Item4>
<Item5>
<Filename Value="todoliststrconsts.pas"/>
<UnitName Value="ToDoListStrConsts"/>
</Item5>
</Files>
<i18n>
<EnableI18N Value="True"/>
<OutDir Value="languages"/>
</i18n>
<Type Value="DesignTime"/>
<RequiredPkgs Count="3">
<Item1>
<PackageName Value="IDEIntf"/>
</Item1>
<Item2>
<PackageName Value="CodeTools"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item3>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)/"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View File

@ -0,0 +1,21 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit todolistlaz;
interface
uses
ToDoDlg, TodoList, ToDoListStrConsts, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('ToDoDlg', @ToDoDlg.Register);
end;
initialization
RegisterPackage('ToDoListLaz', @Register);
end.

View File

@ -0,0 +1,57 @@
{
***************************************************************************
* *
* 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 ToDoListStrConsts;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
resourcestring
lisTodoListCaption='ToDo List';
lisTodolistRefresh='Refresh todo items';
lisTodoListGotoLine='Goto selected source line';
lisTodoListPrintList='Print todo items';
lisToDoListOptions='ToDo options...';
lisCTInsertMacro = 'Insert Macro';
lisToDoLDone = 'Done';
lisToDoLDescription = 'Description';
lisToDoLPriority = 'Priority';
lisToDoLFile = 'Module';
lisToDoLLine = 'Line';
lisToDoLOwner = 'Owner';
listToDoLCategory = 'Category';
lisToDoGoto = 'Goto';
lisToDoExport = 'Export';
dlgFROpts = 'Options';
lisPrint = 'Print';
dlgUnitDepRefresh = 'Refresh';
lisTDDInsertToDo = 'Insert ToDo';
lisViewToDoList = 'View ToDo list';
lisToDoList = 'ToDo list';
lisPkgFileTypeText = 'Text';
implementation
end.

View File

@ -493,11 +493,11 @@ begin
ToolButtonMore.Caption:= lisMore;
ToolButtonTop.Caption:= lisTop;
ToolButtonBottom.Caption:= lisBottom;
ToolButtonGoto.Caption:= lisToDoGoto;
ToolButtonGoto.Caption:=lisGotoSelectedSourceLine;
ToolButtonCopyAll.Caption:= lisCopyAll;
lvCallStack.Columns[1].Caption:= lisIndex;
lvCallStack.Columns[2].Caption:= lisCEOModeSource;
lvCallStack.Columns[3].Caption:= lisToDoLLine;
lvCallStack.Columns[3].Caption:= dlgAddHiAttrGroupLine;
lvCallStack.Columns[4].Caption:= lisFunction;
ToolBar1.Images := IDEImages.Images_16;

View File

@ -1,10 +1,10 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/03/16]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/06/03]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
UNIXs = linux $(BSDs) solaris qnx haiku
LIMIT83fs = go32v2 os2 emx watcom
OSNeedsComspecToRunBatch = go32v2 watcom
FORCE:
@ -59,9 +59,11 @@ endif
endif
ifdef COMSPEC
ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
ifndef RUNBATCH
RUNBATCH=$(COMSPEC) /C
endif
endif
endif
ifdef inUnix
PATHSEP=/
else
@ -308,6 +310,7 @@ BIG_IDE_OPTIONS=-dBigIDE $(LAZARUS_LIBPATHS) \
-Fu../components/sdf/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/memds/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/tachart/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/todolist/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/jcf2/IdePlugin/lazarus/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/chmhelp/packages/help/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/chmhelp/packages/idehelp/lib/$(CPU_TARGET)-$(OS_TARGET)
@ -376,6 +379,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),i386-nativent)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
@ -439,6 +445,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
@ -490,6 +499,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override TARGET_PROGRAMS+=lazarus startlazarus lazbuild
endif
ifeq ($(FULL_TARGET),i386-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -550,6 +562,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-nativent)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),m68k-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -613,6 +628,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -664,6 +682,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
override INSTALL_BASEDIR=share/lazarus/ide
override INSTALL_FPCPACKAGE=n
override DIST_DESTDIR=$(BASEDIR)/dist
@ -727,6 +748,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
@ -790,6 +814,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
@ -841,6 +868,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override COMPILER_OPTIONS+=-gl -dlcl$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
@ -901,6 +931,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
@ -964,6 +997,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
@ -1015,6 +1051,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override COMPILER_INCLUDEDIR+=include include/$(OS_TARGET) ../images
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
@ -1075,6 +1114,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
@ -1138,6 +1180,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
@ -1189,6 +1234,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override COMPILER_UNITDIR+=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) ../components/custom ../components/mpaslex ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) ../designer ../debugger ../debugger/frames ../converter ../packager ../packager/frames ../packager/units/$(CPU_TARGET)-$(OS_TARGET) ../units/$(CPU_TARGET)-$(OS_TARGET) frames .
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_TARGETDIR+=..
endif
@ -1249,6 +1297,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_TARGETDIR+=..
endif
@ -1312,6 +1363,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_TARGETDIR+=..
endif
@ -1363,6 +1417,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override COMPILER_TARGETDIR+=..
endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
@ -1423,6 +1480,9 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
@ -1486,6 +1546,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
@ -1537,6 +1600,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifeq ($(FULL_TARGET),mipsel-linux)
override COMPILER_UNITTARGETDIR+=../units/$(CPU_TARGET)-$(OS_TARGET)
endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@ -1910,6 +1976,10 @@ ifeq ($(OS_TARGET),symbian)
SHAREDLIBEXT=.dll
SHORTSUFFIX=symbian
endif
ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@ -2415,6 +2485,10 @@ ifeq ($(FULL_TARGET),i386-symbian)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),i386-nativent)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),m68k-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
@ -2499,6 +2573,10 @@ ifeq ($(FULL_TARGET),x86_64-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
@ -2567,6 +2645,10 @@ ifeq ($(FULL_TARGET),armeb-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),mipsel-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
@ -2576,9 +2658,9 @@ else
UNITDIR_RTL=$(PACKAGEDIR_RTL)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_RTL)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
endif
else
PACKAGEDIR_RTL=
@ -2988,7 +3070,7 @@ ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
ifdef USETAR
ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
else
ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
@ -3033,6 +3115,9 @@ fpc_zipdistinstall:
ifdef EXEFILES
override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
endif
ifdef CLEAN_PROGRAMS
override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
endif
ifdef CLEAN_UNITS
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
endif
@ -3079,6 +3164,9 @@ endif
ifdef CLEANRSTFILES
-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
endif
endif
ifdef CLEAN_FILES
-$(DEL) $(CLEAN_FILES)
endif
-$(DELTREE) units
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)

View File

@ -115,6 +115,7 @@ BIG_IDE_OPTIONS=-dBigIDE $(LAZARUS_LIBPATHS) \
-Fu../components/sdf/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/memds/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/tachart/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \
-Fu../components/todolist/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/jcf2/IdePlugin/lazarus/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/chmhelp/packages/help/lib/$(CPU_TARGET)-$(OS_TARGET) \
-Fu../components/chmhelp/packages/idehelp/lib/$(CPU_TARGET)-$(OS_TARGET)

View File

@ -49,7 +49,7 @@ uses
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf,
// IDE
KeyMapping, LazarusIDEStrConsts, EnvironmentOpts, IDEOptionDefs, InputHistory,
IDEProcs, TodoList, CodeExplOpts;
IDEProcs, CodeExplOpts;
type
TCodeExplorerView = class;
@ -280,6 +280,10 @@ var
procedure RegisterStandardCodeExplorerMenuItems;
function GetToDoComment(const Src: string;
CommentStartPos, CommentEndPos: integer;
out MagicStartPos, TextStartPos, TextEndPos: integer): boolean;
implementation
{$R *.lfm}
@ -337,6 +341,46 @@ begin
CERenameIDEMenuCommand:=RegisterIDEMenuCommand(Path, 'Rename', lisFRIRename);
end;
function GetToDoComment(const Src: string; CommentStartPos,
CommentEndPos: integer; out MagicStartPos, TextStartPos, TextEndPos: integer
): boolean;
var
StartPos: Integer;
EndPos: Integer;
p: Integer;
begin
if CommentStartPos<1 then exit(false);
if CommentEndPos-CommentStartPos<5 then exit(false);
if Src[CommentStartPos]='/' then begin
StartPos:=CommentStartPos+2;
EndPos:=CommentEndPos;
end else if (Src[CommentStartPos]='{') then begin
StartPos:=CommentStartPos+1;
EndPos:=CommentEndPos-1;
end else if (CommentStartPos<length(Src)) and (Src[CommentStartPos]='(')
and (Src[CommentStartPos+1]='*') then begin
StartPos:=CommentStartPos+2;
EndPos:=CommentEndPos-2;
end else
exit(false);
while (StartPos<EndPos) and (Src[StartPos]=' ') do inc(StartPos);
MagicStartPos:=StartPos;
if Src[StartPos]='#' then inc(StartPos);
if CompareIdentifiers('todo',@Src[StartPos])<>0 then exit(false);
// this is a ToDo
p:=StartPos+length('todo');
TextStartPos:=p;
while (TextStartPos<EndPos) and (Src[TextStartPos]<>':') do inc(TextStartPos);
if Src[TextStartPos]=':' then
inc(TextStartPos) // a todo with colon syntax
else
TextStartPos:=p; // a todo without syntax
while (TextStartPos<EndPos) and (Src[TextStartPos]=' ') do inc(TextStartPos);
TextEndPos:=EndPos;
while (TextEndPos>TextStartPos) and (Src[TextEndPos-1]=' ') do dec(TextEndPos);
Result:=true;
end;
{ TViewNodeData }
constructor TViewNodeData.Create(CodeNode: TCodeTreeNode);

View File

@ -86,8 +86,8 @@ begin
Caption:=lisCTSelectCodeMacro;
MacrosGroupBox.Caption:=lisEdtExtToolMacros;
DescriptionGroupBox.Caption:=lisToDoLDescription;
ButtonPanel1.OkButton.Caption:=lisCTInsertMacro;
DescriptionGroupBox.Caption:=lisCodeHelpDescrTag;
ButtonPanel1.OkButton.Caption:=lisInsertMacro;
ParameterGroupBox.Caption:=lisCMParameter;
ParameterEdit.Text:='';

View File

@ -701,8 +701,7 @@ begin
CodeTemplatePasteIDEMenuCommand := RegisterIDEMenuCommand(Path, 'Paste',
lisMenuPaste);
CodeTemplateInsertMacroIDEMenuCommand := RegisterIDEMenuCommand(Path,
'InsertMacro',
lisCTInsertMacro);
'InsertMacro', lisInsertMacro);
end;
procedure CreateStandardCodeMacros;
@ -942,9 +941,9 @@ begin
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
ButtonPanel.OKButton.OnClick := @OKButtonClick;
FilenameGroupBox.Caption:=lisToDoLFile;
FilenameGroupBox.Caption:=lisDebugOptionsFrmModule;
UseMacrosCheckBox.Caption:=lisEnableMacros;
InsertMacroButton.Caption:=lisCTInsertMacro;
InsertMacroButton.Caption:=lisInsertMacro;
AutoOnOptionsCheckGroup.Caption:=lisCodeTemplAutoCompleteOn;
AutoOnOptionsCheckGroup.Items.Add(lisAutomaticallyOnLineBreak);
AutoOnOptionsCheckGroup.Items.Add(lisAutomaticallyOnSpace);

View File

@ -347,7 +347,6 @@ begin
ecInsertCVSRevision: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecInsertCVSSource: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecInsertGUID: SetResult(VK_G, [ssCtrl,ssShift],VK_UNKNOWN,[]);
ecInsertToDo: SetResult(VK_T, [ssCtrl,ssShift],VK_UNKNOWN,[]);
// command commands
ecUndo: SetResult(VK_Z,[ssCtrl],VK_UNKNOWN,[]);
@ -527,7 +526,6 @@ begin
ecToggleRestrictionBrowser: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleCompPalette: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleIDESpeedBtns: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecViewTodoList: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
// project menu
ecNewProject: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
@ -964,7 +962,6 @@ begin
ecToggleRestrictionBrowser: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleCompPalette: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleIDESpeedBtns: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecViewTodoList: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
// project menu
ecNewProject: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[],VK_UNKNOWN,[]);
@ -1412,7 +1409,6 @@ begin
ecInsertCVSRevision: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecInsertCVSSource: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecInsertGUID: SetResult(VK_G, [ssCtrl,ssShift],VK_UNKNOWN,[]);
ecInsertToDo: SetResult(VK_T, [ssCtrl,ssShift],VK_UNKNOWN,[]);
// command commands
ecUndo: SetResult(VK_Z,[ssMeta],VK_UNKNOWN,[]);
@ -1583,7 +1579,6 @@ begin
ecToggleRestrictionBrowser: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleCompPalette: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecToggleIDESpeedBtns: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
ecViewTodoList: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
// project menu
ecNewProject: SetResult(VK_UNKNOWN,[],VK_UNKNOWN,[]);
@ -2040,7 +2035,6 @@ begin
ecInsertCVSRevision : Result:= srkmecInsertCVSRevision;
ecInsertCVSSource : Result:= srkmecInsertCVSSource;
ecInsertGUID : Result:= srkmecInsertGUID;
ecInsertToDo : Result:= uemInsertTodo;
// search menu
ecFind : Result:= srkmecFind;
@ -2087,7 +2081,6 @@ begin
ecToggleCodeBrowser : Result:= srkmecToggleCodeBrowser;
ecToggleRestrictionBrowser: Result:= srkmecToggleRestrictionBrowser;
ecViewComponents : Result:= srkmecViewComponents;
ecViewTodoList : Result:= srkmecViewToDoList;
ecToggleCompPalette : Result:= srkmecToggleCompPalette;
ecToggleIDESpeedBtns : Result:= srkmecToggleIDESpeedBtns;
@ -2494,7 +2487,7 @@ begin
AddDefault(C, 'Column Select to absolute end', srkmecColSelEditorBottom, ecColSelEditorBottom);
// editing - without menu items in the IDE bar
C:=Categories[AddCategory('text editing commands',srkmCatEditing,
C:=Categories[AddCategory(CommandCategoryTextEditingName,srkmCatEditing,
IDECmdScopeSrcEditOnly)];
AddDefault(C, 'Delete last char', lisKMDeleteLastChar, ecDeleteLastChar);
AddDefault(C, 'Delete char at cursor', srkmecDeletechar, ecDeleteChar);
@ -2535,7 +2528,6 @@ begin
AddDefault(C, 'Insert CVS keyword Source', srkmecInsertCVSSource,
ecInsertCVSSource);
AddDefault(C, 'Insert a GUID',srkmecInsertGUID, ecInsertGUID);
AddDefault(C, 'Insert Todo',uemInsertTodo, ecInsertTodo);
// command commands
C:=Categories[AddCategory('CommandCommands',srkmCatCmdCmd,nil)];
@ -2771,7 +2763,7 @@ begin
AddDefault(C, 'Quit', srkmecQuit, ecQuit);
// view menu
C:=Categories[AddCategory('ViewMenu',srkmCatViewMenu,nil)];
C:=Categories[AddCategory(CommandCategoryViewName,srkmCatViewMenu,nil)];
AddDefault(C, 'Toggle view Object Inspector', lisKMToggleViewObjectInspector,
ecToggleObjectInsp);
AddDefault(C, 'Toggle view Source Editor', lisKMToggleViewSourceEditor,

View File

@ -65,6 +65,7 @@ uses
{$ifdef UseJCF}jcfidelazarus,{$endif}
{$ifdef UseCHMHelp}chmhelppkg,{$endif}
FPCUnitTestRunner, FPCUnitIDE, ProjTemplates, TAChartLazarusPkg,
TodoListLaz,
{$IFDEF windows}
SQLDBLaz, DBFLaz,
{$ENDIF}

View File

@ -1020,6 +1020,7 @@ resourcestring
lisOk = '&OK';
lisCancel = 'Cancel';
lisCMParameter = 'Parameter';
lisInsertMacro = 'Insert Macro';
lisCTPleaseSelectAMacro = 'please select a macro';
lisA2PCreateNewFile = 'Create new file';
dlgEnvLanguage = 'Language';
@ -2186,7 +2187,6 @@ resourcestring
+'system seems to use it.%sThat means non ASCII characters will probably '
+'be shown incorrect.%sYou can select another font in the editor options.';
lisUEDoNotSho = 'Do not show this message again.';
uemInsertTodo = 'Insert Todo';
lisCodeHelpShowEmptyMethods = 'Show empty methods';
lisCodeHelpShowUnusedUnits = 'Show unused units';
uemHighlighter = 'Highlighter';
@ -2686,9 +2686,7 @@ resourcestring
dlgUnitDepBrowse = 'Open';
dlgUnitDepRefresh = 'Refresh';
lisPrint = 'Print';
lisToDoGoto = 'Goto';
lisToDoExport = 'Export';
// Doc Editor
lisDocumentationEditor = 'Documentation Editor';
@ -3016,21 +3014,6 @@ resourcestring
lisDiffDlgOpenDiffInEditor = 'Open Diff in editor';
lisSave = 'Save ...';
// todolist
lisTodoListCaption='ToDo List';
lisTodolistRefresh='Refresh todo items';
lisTodoListGotoLine='Goto selected source line';
lisTodoListPrintList='Print todo items';
lisToDoListOptions='ToDo options...';
lisCTInsertMacro = 'Insert Macro';
lisToDoLDone = 'Done';
lisToDoLDescription = 'Description';
lisToDoLPriority = 'Priority';
lisToDoLFile = 'Module';
lisToDoLLine = 'Line';
lisToDoLOwner = 'Owner';
listToDoLCategory = 'Category';
// packages
lisPkgFileTypeUnit = 'Unit';
lisPkgFileTypeVirtualUnit = 'Virtual Unit';
@ -4376,7 +4359,6 @@ resourcestring
rsEnterOneOrMorePhrasesThatYouWantToSearchOrFilterIn = 'Enter one or more '
+'phrases that you want to Search or Filter in the list, separated by '
+'space, or comma';
lisTDDInsertToDo = 'Insert ToDo';
// Application Bundle
lisABCreationFailed = 'Error occured during Application Bundle creation: ';
@ -4413,6 +4395,7 @@ resourcestring
lisMore = 'More';
lisTop = 'Top';
lisBottom = 'Bottom';
lisGotoSelectedSourceLine = 'Goto selected source line';
lisCopyAll = 'Copy All';
lisIndex = 'Index';
lisFunction = 'Function';

View File

@ -136,7 +136,7 @@ uses
PublishModule, EnvironmentOpts, TransferMacros, KeyMapping, IDETranslations,
IDEProcs, ExtToolDialog, ExtToolEditDlg, OutputFilter, JumpHistoryView,
BuildLazDialog, MiscOptions, InputHistory, UnitDependencies, ClipBoardHistory,
ProcessList, InitialSetupDlgs, NewDialog, MakeResStrDlg, ToDoList,
ProcessList, InitialSetupDlgs, NewDialog, MakeResStrDlg,
DialogProcs, FindReplaceDialog, FindInFilesDlg, CodeExplorer, BuildFileDlg,
ProcedureList, ExtractProcDlg, FindRenameIdentifier, AbstractsMethodsDlg,
EmptyMethodsDlg, UnusedUnitsDlg, FindOverloadsDlg, CleanDirDlg,
@ -238,7 +238,6 @@ type
procedure mnuEditInsertUsernameClick(Sender: TObject);
procedure mnuEditInsertDateTimeClick(Sender: TObject);
procedure mnuEditInsertChangeLogEntryClick(Sender: TObject);
procedure mnuEditInsertTodo(Sender: TObject);
procedure mnuEditInsertGUID(Sender: TObject);
// search menu
@ -272,7 +271,6 @@ type
procedure mnuViewAnchorEditorClicked(Sender: TObject);
procedure mnuViewComponentPaletteClicked(Sender: TObject);
procedure mnuViewIDESpeedButtonsClicked(Sender: TObject);
procedure mnuViewTodoListClicked(Sender: TObject);
// project menu
procedure mnuNewProjectClicked(Sender: TObject);
@ -805,7 +803,6 @@ type
procedure DoShowCodeBrowser(Show: boolean);
procedure DoShowRestrictionBrowser(Show: boolean; const RestrictedName: String = '');
procedure DoShowComponentList(Show: boolean);
procedure DoShowToDoList(Show: boolean);
procedure CreateIDEWindow(Sender: TObject; aFormName: string;
var AForm: TCustomForm; DoDisableAutoSizing: boolean);
function CreateNewUniqueFilename(const Prefix, Ext: string;
@ -1983,7 +1980,6 @@ begin
SourceEditorManager.OnEditorPropertiesClicked := @mnuEnvEditorOptionsClicked;
SourceEditorManager.OnFindDeclarationClicked := @OnSrcNotebookFindDeclaration;
SourceEditorManager.OnInitIdentCompletion :=@OnSrcNotebookInitIdentCompletion;
SourceEditorManager.OnInsertTodoClicked := @mnuEditInsertTodo;
SourceEditorManager.OnShowCodeContext :=@OnSrcNotebookShowCodeContext;
SourceEditorManager.OnJumpToHistoryPoint := @OnSrcNotebookJumpToHistoryPoint;
SourceEditorManager.OnOpenFileAtCursorClicked := @OnSrcNotebookFileOpenAtCursor;
@ -2222,8 +2218,6 @@ begin
nil,@CreateIDEWindow,'250','250','','');
IDEWindowCreators.Add(ComponentListFormName,
nil,@CreateIDEWindow,'250','250','','');
IDEWindowCreators.Add(ToDoWindowName,
nil,@CreateIDEWindow,'250','250','','');
end;
procedure TMainIDE.RestoreIDEWindows;
@ -2425,7 +2419,6 @@ begin
itmEditInsertUsername.OnClick:=@mnuEditInsertUsernameClick;
itmEditInsertDateTime.OnClick:=@mnuEditInsertDateTimeClick;
itmEditInsertChangeLogEntry.OnClick:=@mnuEditInsertChangeLogEntryClick;
itmEditInsertTodo.OnClick:=@mnuEditInsertTodo;
itmEditInsertGUID.OnClick:=@mnuEditInsertGUID;
end;
end;
@ -2463,7 +2456,6 @@ begin
itmViewAnchorEditor.OnClick := @mnuViewAnchorEditorClicked;
itmViewComponentPalette.OnClick := @mnuViewComponentPaletteClicked;
itmViewIDESpeedButtons.OnClick := @mnuViewIDESpeedButtonsClicked;
itmViewToDoList.OnClick := @mnuViewTodoListClicked;
end;
end;
@ -2597,11 +2589,6 @@ begin
DoToggleViewIDESpeedButtons;
end;
procedure TMainIDE.mnuViewTodoListClicked(Sender: TObject);
begin
DoShowToDoList(true);
end;
procedure TMainIDE.SetDesigning(AComponent: TComponent; Value: Boolean);
begin
SetComponentDesignMode(AComponent, Value);
@ -3114,9 +3101,6 @@ begin
ecInsertGUID:
mnuEditInsertGUID(self);
ecInsertTodo:
mnuEditInsertTodo(self);
else
Handled:=false;
// let the bosses handle it
@ -9067,11 +9051,6 @@ begin
begin
DoShowComponentList(false);
AForm:=ComponentListForm;
end
else if ItIs(ToDoWindowName) then
begin
DoShowToDoList(false);
AForm:=IDETodoWindow;
end;
if (AForm<>nil) and DoDisableAutoSizing then
AForm.DisableAutoSizing;
@ -10530,19 +10509,6 @@ begin
Result:=DoSaveProject([sfSaveToTestDir,sfCheckAmbiguousFiles]+Flags);
end;
procedure TMainIDE.DoShowToDoList(Show: boolean);
begin
CreateTodoWindow;
if Project1.MainUnitInfo<>nil then
IDETodoWindow.MainSourceFilename:=Project1.MainUnitInfo.Filename
else
IDETodoWindow.MainSourceFilename:='';
if Show then
IDEWindowCreators.ShowForm(IDETodoWindow,true);
end;
function TMainIDE.DoTestCompilerSettings(
TheCompilerOptions: TCompilerOptions): TModalResult;
begin
@ -16839,11 +16805,6 @@ begin
DoSourceEditorCommand(ecInsertChangeLogEntry);
end;
procedure TMainIDE.mnuEditInsertTodo(Sender: TObject);
begin
DoSourceEditorCommand(ecInsertTodo);
end;
procedure TMainIDE.mnuEditInsertGUID(Sender: TObject);
begin
DoInsertGUID;

View File

@ -196,7 +196,6 @@ type
itmViewCodeBrowser: TIDEMenuCommand;
itmViewRestrictionBrowser: TIDEMenuCommand;
itmViewComponents: TIDEMenuCommand;
itmViewToDoList: TIDEMenuCommand;
itmJumpHistory: TIDEMenuCommand;
//itmViewUnitWindows: TIDEMenuSection;
itmViewUnits: TIDEMenuCommand;

View File

@ -482,7 +482,6 @@ begin
CreateMenuItem(SubSubParentMI,itmEditInsertDateTime,'itmEditInsertDateTime',lisMenuInsertDateTime);
CreateMenuItem(SubSubParentMI,itmEditInsertChangeLogEntry,'itmEditInsertChangeLogEntry',lisMenuInsertChangeLogEntry);
CreateMenuItem(SubSubParentMI,itmEditInsertGUID,'itmEditInsertGUID',srkmecInsertGUID);
CreateMenuItem(SubSubParentMI,itmEditInsertTodo,'itmEditInsertTodo',uemInsertTodo);
end;
end;
@ -557,7 +556,6 @@ begin
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,itmViewToDoList,'itmViewToDoList',lisMenuViewTodoList, 'menu_view_todo');
CreateMenuItem(ParentMI,itmJumpHistory,'itmJumpHistory',lisMenuViewJumpHistory);
CreateMenuSeparatorSection(mnuView,itmViewUnitWindows,'itmViewUnitWindows');
@ -882,7 +880,6 @@ begin
itmEditInsertDateTime.Command:=GetCommand(ecInsertDateTime);
itmEditInsertChangeLogEntry.Command:=GetCommand(ecInsertChangeLogEntry);
itmEditInsertGUID.Command:=GetCommand(ecInsertGUID);
itmEditInsertTodo.Command:=GetCommand(ecInsertTodo);
// search menu
itmSearchFind.Command:=GetCommand(ecFind);
@ -918,7 +915,6 @@ begin
itmViewCodeBrowser.Command:=GetCommand(ecToggleCodeBrowser);
itmViewRestrictionBrowser.Command:=GetCommand(ecToggleRestrictionBrowser);
itmViewComponents.Command:=GetCommand(ecViewComponents);
itmViewToDoList.Command:=GetCommand(ecViewTodoList);
itmViewUnitDependencies.Command:=GetCommand(ecViewUnitDependencies);
itmViewUnitInfo.Command:=GetCommand(ecViewUnitInfo);
itmViewForms.Command:=GetCommand(ecViewForms);

View File

@ -273,13 +273,13 @@ begin
NewFilename:=LazarusIDE.FindUnitFile(UsedByUnit);
if NewFilename='' then begin
DebugLn('QuickFixUnitNotFoundPosition unit not found: ',UsedByUnit);
ShowError('QuickFix: UnitNotFoundPosition unit not found: '+UsedByUnit);
//ShowError('QuickFix: UnitNotFoundPosition unit not found: '+UsedByUnit);
exit;
end;
CodeBuf:=CodeToolBoss.LoadFile(NewFilename,false,false);
if CodeBuf=nil then begin
DebugLn('QuickFixUnitNotFoundPosition unable to load unit: ',NewFilename);
ShowError('QuickFix: UnitNotFoundPosition unable to load unit: '+NewFilename);
//ShowError('QuickFix: UnitNotFoundPosition unable to load unit: '+NewFilename);
exit;
end;
end;
@ -289,7 +289,7 @@ begin
NamePos,InPos)
then begin
DebugLn('QuickFixUnitNotFoundPosition failed due to syntax errors or '+MissingUnitname+' is not used in '+CodeBuf.Filename);
LazarusIDE.DoJumpToCodeToolBossError;
//LazarusIDE.DoJumpToCodeToolBossError;
exit;
end;
if InPos=0 then ;

View File

@ -327,7 +327,7 @@ begin
ImageIndexTemplate := IDEImages.LoadImage(16, 'template');
ImageIndexFolder := IDEImages.LoadImage(16, 'folder');
DescriptionGroupBox.Caption := lisToDoLDescription;
DescriptionGroupBox.Caption := lisCodeHelpDescrTag;
DescriptionLabel.Caption := '';
ButtonPanel.OKButton.OnClick := @OKButtonClick;
@ -536,7 +536,7 @@ end;
function TNewLazIDEItemCategoryFile.LocalizedName: string;
begin
Result := lisToDoLFile;
Result := lisDebugOptionsFrmModule;
end;
function TNewLazIDEItemCategoryFile.Description: string;

View File

@ -125,7 +125,7 @@ begin
OnSelectionChange:=@ListBoxSelectionChange;
end;
DescriptionGroupBox.Caption := lisToDoLDescription;
DescriptionGroupBox.Caption := lisCodeHelpDescrTag;
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
end;

View File

@ -265,7 +265,7 @@ begin
tbCopy.Hint := lisPListCopyMethodToClipboard;
LV.Column[1].Caption := lisProcedure;
LV.Column[2].Caption := lisPListType;
LV.Column[3].Caption := lisToDoLLine;
LV.Column[3].Caption := dlgAddHiAttrGroupLine;
// assign resource images to toolbuttons
TB.Images := IDEImages.Images_16;

View File

@ -59,7 +59,7 @@ uses
WordCompletion, FindReplaceDialog, IDEProcs, IDEOptionDefs,
MacroPromptDlg, TransferMacros, CodeContextForm, SrcEditHintFrm,
EnvironmentOpts, MsgView, InputHistory, CodeMacroPrompt,
CodeTemplatesDlg, TodoDlg, TodoList, CodeToolsOptions,
CodeTemplatesDlg, CodeToolsOptions,
SortSelectionDlg, EncloseSelectionDlg, ConDef, InvertAssignTool,
SourceEditProcs, SourceMarks, CharacterMapDlg, SearchFrm,
FPDocHints,
@ -382,7 +382,6 @@ type
procedure InsertLGPLNotice(CommentType: TCommentType);
procedure InsertModifiedLGPLNotice(CommentType: TCommentType);
procedure InsertUsername;
procedure InsertTodo;
procedure InsertDateTime;
procedure InsertChangeLogEntry;
procedure InsertCVSKeyword(const AKeyWord: string);
@ -592,7 +591,6 @@ type
procedure FindNextWordOccurrenceClicked(Sender: TObject);
procedure FindPrevWordOccurrenceClicked(Sender: TObject);
procedure FindInFilesClicked(Sender: TObject);
procedure InsertTodoClicked(Sender: TObject);
procedure MoveEditorLeftClicked(Sender: TObject);
procedure MoveEditorRightClicked(Sender: TObject);
procedure MoveEditorFirstClicked(Sender: TObject);
@ -1059,7 +1057,6 @@ type
FOnGetIndent: TOnGetIndentEvent;
FOnGotoBookmark: TBookMarkActionEvent;
FOnInitIdentCompletion: TOnInitIdentCompletion;
FOnInsertTodoClicked: TNotifyEvent;
FOnJumpToHistoryPoint: TOnJumpToHistoryPoint;
FOnMouseLink: TSynMouseLinkEvent;
FOnNoteBookCloseQuery: TCloseEvent;
@ -1095,8 +1092,6 @@ type
read FOnFindDeclarationClicked write FOnFindDeclarationClicked;
property OnInitIdentCompletion: TOnInitIdentCompletion
read FOnInitIdentCompletion write FOnInitIdentCompletion;
property OnInsertTodoClicked: TNotifyEvent
read FOnInsertTodoClicked write FOnInsertTodoClicked;
property OnShowCodeContext: TOnShowCodeContext
read FOnShowCodeContext write FOnShowCodeContext;
property OnJumpToHistoryPoint: TOnJumpToHistoryPoint
@ -1180,7 +1175,6 @@ var
SrcEditMenuShowEmptyMethods: TIDEMenuCommand;
SrcEditMenuShowUnusedUnits: TIDEMenuCommand;
SrcEditMenuFindOverloads: TIDEMenuCommand;
SrcEditMenuInsertTodo: TIDEMenuCommand;
SrcEditMenuMoveEditorLeft: TIDEMenuCommand;
SrcEditMenuMoveEditorRight: TIDEMenuCommand;
SrcEditMenuMoveEditorFirst: TIDEMenuCommand;
@ -1429,9 +1423,6 @@ begin
SrcEditMenuFindOverloads.Visible:=false;
{$ENDIF}
SrcEditMenuInsertTodo:=RegisterIDEMenuCommand(SourceEditorMenuRoot,
'InsertTodo',uemInsertTodo, nil, nil, nil, 'item_todo');
SrcEditMenuEditorProperties:=RegisterIDEMenuCommand(SourceEditorMenuRoot,
'EditorProperties', dlgFROpts, nil, nil, nil, 'menu_environment_options');
end;
@ -3007,9 +2998,6 @@ Begin
ecInsertDateTime:
InsertDateTime;
ecInsertTodo:
InsertTodo;
ecInsertChangeLogEntry:
InsertChangeLogEntry;
@ -3484,21 +3472,6 @@ begin
FEditor.InsertTextAtCaret(GetCurrentUserName);
end;
procedure TSourceEditor.InsertTodo;
Var
aTodoItem: TTodoItem;
begin
//DebugLn(['TSourceEditor.InsertTodo ']);
if ReadOnly then Exit;
aTodoItem := ExecuteTodoDialog;
try
if Assigned(aTodoItem) then
FEditor.InsertTextAtCaret(aTodoItem.AsComment);
finally
aTodoItem.Free;
end;
end;
procedure TSourceEditor.InsertDateTime;
begin
if ReadOnly then Exit;
@ -5418,8 +5391,6 @@ begin
SrcEditMenuMoveEditorLast.OnClick:=@MoveEditorLastClicked;
SrcEditMenuMoveEditorLast.OnClick:=@MoveEditorLastClicked;
SrcEditMenuInsertTodo.OnClick:=@InsertTodoClicked;
SrcEditMenuCompleteCode.OnClick:=@CompleteCodeMenuItemClick;
SrcEditMenuEncloseSelection.OnClick:=@EncloseSelectionMenuItemClick;
SrcEditMenuExtractProc.OnClick:=@ExtractProcMenuItemClick;
@ -6428,12 +6399,6 @@ begin
SrcEdit.DoEditorExecuteCommand(ecFindInFiles);
end;
procedure TSourceNotebook.InsertTodoClicked(Sender: TObject);
begin
if assigned(Manager) and Assigned(Manager.OnInsertTodoClicked) then
Manager.OnInsertTodoClicked(Sender);
end;
Procedure TSourceNotebook.CutClicked(Sender: TObject);
var ActSE: TSourceEditor;
begin

View File

@ -115,8 +115,7 @@ const
ecInsertCVSRevision = ecFirstLazarus + 92;
ecInsertCVSSource = ecFirstLazarus + 93;
ecInsertModifiedLGPLNotice= ecFirstLazarus + 94;
ecInsertTodo = ecFirstLazarus + 95;
ecInsertGUID = ecFirstLazarus + 96;
ecInsertGUID = ecFirstLazarus + 95;
// source tools
ecWordCompletion = ecFirstLazarus + 100;
@ -522,6 +521,8 @@ var
const
CommandCategoryToolMenuName = 'ToolMenu';
CommandCategoryCustomName = 'Custom';
CommandCategoryTextEditingName = 'text editing commands';
CommandCategoryViewName = 'ViewMenu';
// register a new IDE command category (i.e. set of commands)
function RegisterIDECommandCategory(Parent: TIDECommandCategory;

View File

@ -785,11 +785,14 @@ procedure TIDEWindowCreatorList.CreateForm(var AForm: TCustomForm;
AFormClass: TCustomFormClass; DoDisableAutoSizing: boolean;
TheOwner: TComponent);
begin
AForm:=TCustomForm(AFormClass.NewInstance);
AForm.DisableAutoSizing;
AForm.Create(TheOwner);
if not DoDisableAutoSizing then
AForm.EnableAutoSizing;
if AForm=nil then begin
AForm:=TCustomForm(AFormClass.NewInstance);
AForm.DisableAutoSizing;
AForm.Create(TheOwner);
if not DoDisableAutoSizing then
AForm.EnableAutoSizing;
end else if DoDisableAutoSizing then
AForm.DisableAutoSizing;
end;
{ TIDEDockMaster }

View File

@ -1548,7 +1548,9 @@ procedure TIDEMenuCommand.MenuItemClick(Sender: TObject);
begin
inherited MenuItemClick(Sender);
// dont execute if something is already executed
if not Assigned(OnClick) and not Assigned(OnClickProc) and Assigned(Command) then
//debugln(['TIDEMenuCommand.MenuItemClick ',Assigned(OnClick),' ',Assigned(OnClickProc),' ',Assigned(Command),' ',(Command<>nil) and (Command.OnExecuteProc<>nil)]);
if (not Assigned(OnClick)) and (not Assigned(OnClickProc))
and Assigned(Command) then
Command.Execute(Sender);
end;

View File

@ -198,7 +198,7 @@ procedure TAddFileToAPackageDialog.SetupComponents;
var
pft: TPkgFileType;
begin
FileGroupBox.Caption:=lisToDoLFile;
FileGroupBox.Caption:=dlgFoldDiffFile;
FileNameEdit.Text:='';
UnitNameLabel.Caption:=lisAF2PUnitName;
UnitNameEdit.Text:='';

View File

@ -962,7 +962,7 @@ end;
procedure TAddToPackageDlg.SetupNewFilePage;
begin
with NewFileDescriptionGroupBox do begin
Caption:=lisToDoLDescription;
Caption:=lisCodeHelpDescrTag;
end;
with NewFileHelpLabel do begin

View File

@ -0,0 +1 @@
$(LazarusDir)/components/todolist/todolistlaz.lpk

View File

@ -59,7 +59,7 @@ uses
PackageDefs, PackageLinks, PackageSystem, OpenInstalledPkgDlg,
PkgGraphExplorer, BrokenDependenciesDlg, CompilerOptions, ExtToolEditDlg,
IDETranslations, TransferMacros, MsgView, BuildLazDialog, NewDialog,
IDEDialogs, TodoList, ProjectInspector, ComponentPalette, SourceEditor,
IDEDialogs, ProjectInspector, ComponentPalette, SourceEditor,
AddFileToAPackageDlg, LazarusPackageIntf, PublishProjectDlg, PkgLinksDlg,
InstallPkgSetDlg, ConfirmPkgListDlg,
// bosses
@ -99,8 +99,6 @@ type
SaveAs: boolean): TModalResult;
function OnPackageEditorViewPkgSource(Sender: TObject;
APackage: TLazPackage): TModalResult;
function OnPackageEditorViewPkgToDos(Sender: TObject;
APackage: TLazPackage): TModalResult;
procedure OnPackageEditorFreeEditor(APackage: TLazPackage);
procedure OnPackageEditorGetUnitRegisterInfo(Sender: TObject;
const AFilename: string; var TheUnitName: string;
@ -303,7 +301,6 @@ type
Flags: TPkgUninstallFlags; ShowAbort: boolean): TModalResult;
procedure DoTranslatePackage(APackage: TLazPackage);
function DoOpenPackageSource(APackage: TLazPackage): TModalResult;
procedure DoViewPackageToDos(APackage: TLazPackage);
function DoCompileAutoInstallPackages(Flags: TPkgCompileFlags
): TModalResult; override;
function DoSaveAutoInstallConfig: TModalResult; override;
@ -921,13 +918,6 @@ begin
Result:=DoOpenPackageSource(APackage);
end;
function TPkgManager.OnPackageEditorViewPkgToDos(Sender: TObject;
APackage: TLazPackage): TModalResult;
begin
Result:=mrOk;
DoViewPackageToDos(APackage);
end;
procedure TPkgManager.PackageGraphBeginUpdate(Sender: TObject);
begin
if PackageGraphExplorer<>nil then PackageGraphExplorer.BeginUpdate;
@ -1825,7 +1815,6 @@ begin
PackageEditors.OnInstallPackage:=@OnPackageEditorInstallPackage;
PackageEditors.OnUninstallPackage:=@OnPackageEditorUninstallPackage;
PackageEditors.OnViewPackageSource:=@OnPackageEditorViewPkgSource;
PackageEditors.OnViewPackageToDos:=@OnPackageEditorViewPkgToDos;
PackageEditors.OnDeleteAmbiguousFiles:=@OnPackageEditorDeleteAmbiguousFiles;
PackageEditors.OnCreateMakefile:=@OnPackageEditorCreateMakefile;
@ -3898,17 +3887,6 @@ begin
Result:=MainIDE.DoOpenEditorFile(Filename,-1,-1,[ofRegularFile]);
end;
procedure TPkgManager.DoViewPackageToDos(APackage: TLazPackage);
begin
CreateTodoWindow;
if APackage.GetSrcFilename<>'' then
IDETodoWindow.MainSourceFilename:=APackage.GetSrcFilename
else
IDETodoWindow.MainSourceFilename:='';
IDEWindowCreators.ShowForm(IDETodoWindow,true);
end;
function TPkgManager.DoCompileAutoInstallPackages(
Flags: TPkgCompileFlags): TModalResult;
var

View File

@ -399,7 +399,7 @@ procedure TPackageOptionsDialog.SetupComponents;
begin
Notebook.Page[0].Caption:=lisPckOptsUsage;
Notebook.Page[1].Caption:=lisPckOptsUsage; // todo: add new caption
Notebook.Page[2].Caption:=lisToDoLDescription;
Notebook.Page[2].Caption:=lisCodeHelpDescrTag;
Notebook.Page[3].Caption:=lisPckOptsIDEIntegration;
Notebook.Page[4].Caption:=lisPckOptsProvides;
Notebook.Page[5].Caption:=dlgPOI18n;