mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 12:12:25 +02:00
IDE: clean up
git-svn-id: trunk@45273 -
This commit is contained in:
parent
46713481f5
commit
4e49bc99a1
@ -1141,7 +1141,6 @@ type
|
|||||||
procedure OnWordCompletionGetSource(var Source: TStrings; SourceIndex: integer);
|
procedure OnWordCompletionGetSource(var Source: TStrings; SourceIndex: integer);
|
||||||
procedure OnSourceCompletionTimer(Sender: TObject);
|
procedure OnSourceCompletionTimer(Sender: TObject);
|
||||||
// marks
|
// marks
|
||||||
function OnSourceMarksGetFilename(ASourceEditor: TObject): string;
|
|
||||||
procedure OnSourceMarksAction(AMark: TSourceMark; AAction: TMarksAction);
|
procedure OnSourceMarksAction(AMark: TSourceMark; AAction: TMarksAction);
|
||||||
{$IFDEF EnableNewExtTools}
|
{$IFDEF EnableNewExtTools}
|
||||||
procedure OnSourceMarksGetSynEdit(Sender: TObject; aFilename: string;
|
procedure OnSourceMarksGetSynEdit(Sender: TObject; aFilename: string;
|
||||||
@ -10394,14 +10393,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceEditorManager.OnSourceMarksGetFilename(ASourceEditor: TObject
|
|
||||||
): string;
|
|
||||||
begin
|
|
||||||
if (ASourceEditor = nil) or (not (ASourceEditor is TSourceEditor)) then
|
|
||||||
RaiseException('TSourceNotebook.OnSourceMarksGetFilename');
|
|
||||||
Result := TSourceEditor(ASourceEditor).Filename;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSourceEditorManager.OnSourceMarksAction(AMark: TSourceMark;
|
procedure TSourceEditorManager.OnSourceMarksAction(AMark: TSourceMark;
|
||||||
AAction: TMarksAction);
|
AAction: TMarksAction);
|
||||||
var
|
var
|
||||||
@ -10478,7 +10469,6 @@ begin
|
|||||||
|
|
||||||
// marks
|
// marks
|
||||||
SourceEditorMarks:=TSourceMarks.Create(Self);
|
SourceEditorMarks:=TSourceMarks.Create(Self);
|
||||||
SourceEditorMarks.OnGetFilename:=@OnSourceMarksGetFilename;
|
|
||||||
SourceEditorMarks.OnAction:=@OnSourceMarksAction;
|
SourceEditorMarks.OnAction:=@OnSourceMarksAction;
|
||||||
{$IFDEF EnableNewExtTools}
|
{$IFDEF EnableNewExtTools}
|
||||||
SourceEditorMarks.ExtToolsMarks.OnGetSynEditOfFile:=@OnSourceMarksGetSynEdit;
|
SourceEditorMarks.ExtToolsMarks.OnGetSynEditOfFile:=@OnSourceMarksGetSynEdit;
|
||||||
@ -10513,7 +10503,6 @@ end;
|
|||||||
|
|
||||||
destructor TSourceEditorManager.Destroy;
|
destructor TSourceEditorManager.Destroy;
|
||||||
begin
|
begin
|
||||||
SourceEditorMarks.OnGetFilename := nil;
|
|
||||||
SourceEditorMarks.OnAction := nil;
|
SourceEditorMarks.OnAction := nil;
|
||||||
Application.RemoveAllHandlersOfObject(Self);
|
Application.RemoveAllHandlersOfObject(Self);
|
||||||
// aWordCompletion is released in InternalFinal
|
// aWordCompletion is released in InternalFinal
|
||||||
|
@ -201,7 +201,6 @@ type
|
|||||||
fInvalidDisabledBreakPointImg: Integer;
|
fInvalidDisabledBreakPointImg: Integer;
|
||||||
fItems: TList;// list of TSourceMark
|
fItems: TList;// list of TSourceMark
|
||||||
fMultiBreakPointImg: Integer;
|
fMultiBreakPointImg: Integer;
|
||||||
FOnGetFilename: TGetFilenameEvent;
|
|
||||||
FOnAction: TMarksActionEvent;
|
FOnAction: TMarksActionEvent;
|
||||||
fSortedItems: TAVLTree;// tree of TSourceMark
|
fSortedItems: TAVLTree;// tree of TSourceMark
|
||||||
fUnknownBreakPointImg: Integer;
|
fUnknownBreakPointImg: Integer;
|
||||||
@ -219,7 +218,6 @@ type
|
|||||||
function AddCustomMark(TheOwner: TSourceEditorBase; Data: TObject;
|
function AddCustomMark(TheOwner: TSourceEditorBase; Data: TObject;
|
||||||
MarkClass: TSourceMarkClass): TSourceMark;
|
MarkClass: TSourceMarkClass): TSourceMark;
|
||||||
function AddImage(const ResName: string): integer;
|
function AddImage(const ResName: string): integer;
|
||||||
function GetFilename(AMark: TSourceMark): string;
|
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure Delete(Index: integer);
|
procedure Delete(Index: integer);
|
||||||
procedure Remove(AMark: TSourceMark);
|
procedure Remove(AMark: TSourceMark);
|
||||||
@ -234,8 +232,6 @@ type
|
|||||||
public
|
public
|
||||||
property ImgList: TImageList read FImgList write FImgList;
|
property ImgList: TImageList read FImgList write FImgList;
|
||||||
property Items[Index: integer]: TSourceMark read GetItems; default;
|
property Items[Index: integer]: TSourceMark read GetItems; default;
|
||||||
property OnGetFilename: TGetFilenameEvent read FOnGetFilename
|
|
||||||
write FOnGetFilename;
|
|
||||||
property OnAction: TMarksActionEvent read FOnAction write FOnAction;
|
property OnAction: TMarksActionEvent read FOnAction write FOnAction;
|
||||||
{$IFDEF EnableNewExtTools}
|
{$IFDEF EnableNewExtTools}
|
||||||
property ExtToolsMarks: TETMarks read FExtToolsMarks;
|
property ExtToolsMarks: TETMarks read FExtToolsMarks;
|
||||||
@ -458,9 +454,7 @@ end;
|
|||||||
|
|
||||||
function TSourceMark.GetFilename: string;
|
function TSourceMark.GetFilename: string;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:=FSourceEditorID.Filename;
|
||||||
if FSourceMarks=nil then exit;
|
|
||||||
Result:=FSourceMarks.GetFilename(Self);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceMark.GetHint: string;
|
function TSourceMark.GetHint: string;
|
||||||
@ -827,14 +821,6 @@ begin
|
|||||||
Result := ImgList.AddResourceName(HInstance, Resname);
|
Result := ImgList.AddResourceName(HInstance, Resname);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceMarks.GetFilename(AMark: TSourceMark): string;
|
|
||||||
begin
|
|
||||||
Result:='';
|
|
||||||
if (AMark=nil) or (not Assigned(OnGetFilename)) then exit;
|
|
||||||
if AMark.SourceEditor=nil then exit;
|
|
||||||
Result:=OnGetFilename(AMark.SourceEditor);
|
|
||||||
end;
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
SourceEditorMarks:=nil;
|
SourceEditorMarks:=nil;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user