mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 08:59:13 +02:00
fixed linux compilation, fixed codetools searching class header comment
git-svn-id: trunk@8127 -
This commit is contained in:
parent
26272265eb
commit
9542928f63
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -931,7 +931,6 @@ ide/lazarus_dci.lrs svneol=native#text/pascal
|
|||||||
ide/lazarusidestrconsts.pas svneol=native#text/pascal
|
ide/lazarusidestrconsts.pas svneol=native#text/pascal
|
||||||
ide/lazarusmanager.pas svneol=native#text/pascal
|
ide/lazarusmanager.pas svneol=native#text/pascal
|
||||||
ide/lazconf.pp svneol=native#text/pascal
|
ide/lazconf.pp svneol=native#text/pascal
|
||||||
ide/lazcwstring.pas svneol=native#text/plain
|
|
||||||
ide/lazdocfrm.lfm svneol=native#text/plain
|
ide/lazdocfrm.lfm svneol=native#text/plain
|
||||||
ide/lazdocfrm.lrs svneol=native#text/plain
|
ide/lazdocfrm.lrs svneol=native#text/plain
|
||||||
ide/lazdocfrm.pas svneol=native#text/plain
|
ide/lazdocfrm.pas svneol=native#text/plain
|
||||||
@ -1921,6 +1920,7 @@ lcl/languages/lcl.ru.po svneol=native#text/plain
|
|||||||
lcl/languages/lcl.ruold.po svneol=native#text/plain
|
lcl/languages/lcl.ruold.po svneol=native#text/plain
|
||||||
lcl/languages/lcl.ruwin.po svneol=native#text/plain
|
lcl/languages/lcl.ruwin.po svneol=native#text/plain
|
||||||
lcl/languages/lcl.ua.po svneol=native#text/plain
|
lcl/languages/lcl.ua.po svneol=native#text/plain
|
||||||
|
lcl/lazcwstring.pas svneol=native#text/plain
|
||||||
lcl/lazlinkedlist.pas svneol=native#text/pascal
|
lcl/lazlinkedlist.pas svneol=native#text/pascal
|
||||||
lcl/lclclasses.pp svneol=native#text/pascal
|
lcl/lclclasses.pp svneol=native#text/pascal
|
||||||
lcl/lclicons.lrs svneol=native#text/pascal
|
lcl/lclicons.lrs svneol=native#text/pascal
|
||||||
|
@ -3272,7 +3272,6 @@ var
|
|||||||
var
|
var
|
||||||
CleanCursorPos: integer;
|
CleanCursorPos: integer;
|
||||||
ANode: TCodeTreeNode;
|
ANode: TCodeTreeNode;
|
||||||
PrevNode: TCodeTreeNode;
|
|
||||||
p: LongInt;
|
p: LongInt;
|
||||||
CommentLvl: Integer;
|
CommentLvl: Integer;
|
||||||
CommentStartPos: LongInt;
|
CommentStartPos: LongInt;
|
||||||
@ -3286,7 +3285,8 @@ begin
|
|||||||
' SearchInParentNode='+dbgs(SearchInParentNode),
|
' SearchInParentNode='+dbgs(SearchInParentNode),
|
||||||
' WithCommentBounds='+dbgs(WithCommentBounds),
|
' WithCommentBounds='+dbgs(WithCommentBounds),
|
||||||
' CaseSensitive='+dbgs(CaseSensitive),
|
' CaseSensitive='+dbgs(CaseSensitive),
|
||||||
' IgnoreSpaces='+dbgs(IgnoreSpaces));}
|
' IgnoreSpaces='+dbgs(IgnoreSpaces),
|
||||||
|
' CompareOnlyStart='+dbgs(CompareOnlyStart)); }
|
||||||
|
|
||||||
// parse source and find clean positions
|
// parse source and find clean positions
|
||||||
if InvokeBuildTree then
|
if InvokeBuildTree then
|
||||||
@ -3299,8 +3299,6 @@ begin
|
|||||||
ANode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
ANode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
if (ANode=nil) then exit;
|
if (ANode=nil) then exit;
|
||||||
|
|
||||||
if SearchInParentNode and (ANode.Parent<>nil) then
|
|
||||||
ANode:=ANode.Parent;
|
|
||||||
{ find end of last atom in front of node
|
{ find end of last atom in front of node
|
||||||
for example:
|
for example:
|
||||||
uses classes;
|
uses classes;
|
||||||
@ -3310,10 +3308,22 @@ begin
|
|||||||
|
|
||||||
If ANode is the 'type' block, the position after the semicolon is searched
|
If ANode is the 'type' block, the position after the semicolon is searched
|
||||||
}
|
}
|
||||||
PrevNode:=ANode.Prior;
|
|
||||||
if PrevNode<>nil then begin
|
if SearchInParentNode and (ANode.Parent<>nil) then begin
|
||||||
MoveCursorToLastNodeAtom(PrevNode);
|
// search all siblings in front
|
||||||
|
ANode:=ANode.Parent;
|
||||||
|
MoveCursorToCleanPos(ANode.Parent.StartPos);
|
||||||
|
end else if ANode.Prior<>nil then begin
|
||||||
|
// search between prior sibling and this node
|
||||||
|
//DebugLn('TStandardCodeTool.FindCommentInFront ANode.Prior=',ANode.Prior.DescAsString);
|
||||||
|
MoveCursorToLastNodeAtom(ANode.Prior);
|
||||||
|
end else if ANode.Parent<>nil then begin
|
||||||
|
// search from start of parent node to this node
|
||||||
|
//DebugLn('TStandardCodeTool.FindCommentInFront ANode.Parent=',ANode.Parent.DescAsString);
|
||||||
|
MoveCursorToCleanPos(ANode.Parent.StartPos);
|
||||||
end else begin
|
end else begin
|
||||||
|
// search in this node
|
||||||
|
//DebugLn('TStandardCodeTool.FindCommentInFront Aode=',ANode.DescAsString);
|
||||||
MoveCursorToCleanPos(ANode.StartPos);
|
MoveCursorToCleanPos(ANode.StartPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3386,6 +3396,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
//DebugLn('TStandardCodeTool.FindCommentInFront NextAtom=',GetAtom);
|
||||||
until (CurPos.EndPos>=CleanCursorPos) or (CurPos.EndPos>=SrcLen);
|
until (CurPos.EndPos>=CleanCursorPos) or (CurPos.EndPos>=SrcLen);
|
||||||
|
|
||||||
Result:=(FoundStartPos>=1)
|
Result:=(FoundStartPos>=1)
|
||||||
|
@ -179,6 +179,7 @@ function SpecialCharsToSpaces(const s: string): string;
|
|||||||
function StringListToText(List: TStrings; const Delimiter: string;
|
function StringListToText(List: TStrings; const Delimiter: string;
|
||||||
IgnoreEmptyLines: boolean = false): string;
|
IgnoreEmptyLines: boolean = false): string;
|
||||||
|
|
||||||
|
|
||||||
// environment
|
// environment
|
||||||
function EnvironmentAsStringList: TStringList;
|
function EnvironmentAsStringList: TStringList;
|
||||||
procedure AssignEnvironmentTo(DestStrings, Overrides: TStrings);
|
procedure AssignEnvironmentTo(DestStrings, Overrides: TStrings);
|
||||||
|
@ -60,8 +60,6 @@ type
|
|||||||
|
|
||||||
{ TProgressWait }
|
{ TProgressWait }
|
||||||
|
|
||||||
{ TProgressWait }
|
|
||||||
|
|
||||||
TProgressWait = class
|
TProgressWait = class
|
||||||
public
|
public
|
||||||
StartTime: TDateTime;
|
StartTime: TDateTime;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
// Created by Svn2RevisionInc
|
// Created by Svn2RevisionInc
|
||||||
const RevisionStr = '8117M';
|
const RevisionStr = '8123M';
|
||||||
|
@ -20,7 +20,7 @@ unit SrcEditorIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls;
|
Classes, SysUtils, LCLProc, Forms, Controls;
|
||||||
|
|
||||||
type
|
type
|
||||||
TSrcEditSearchOption = (sesoMatchCase, sesoWholeWord, sesoBackwards,
|
TSrcEditSearchOption = (sesoMatchCase, sesoWholeWord, sesoBackwards,
|
||||||
@ -216,8 +216,8 @@ var
|
|||||||
begin
|
begin
|
||||||
NewName:=IDECodeMacros.CreateUniqueName(Name);
|
NewName:=IDECodeMacros.CreateUniqueName(Name);
|
||||||
Result:=TIDECodeMacro.Create(NewName);
|
Result:=TIDECodeMacro.Create(NewName);
|
||||||
Result.ShortDescription:=ShortDescription;
|
Result.ShortDescription:=ConvertLineEndings(ShortDescription);
|
||||||
Result.LongDescription:=LongDescription;
|
Result.LongDescription:=ConvertLineEndings(LongDescription);
|
||||||
Result.OnGetValueProc:=OnGetValueProc;
|
Result.OnGetValueProc:=OnGetValueProc;
|
||||||
Result.OnGetValueMethod:=OnGetValueMethod;
|
Result.OnGetValueMethod:=OnGetValueMethod;
|
||||||
IDECodeMacros.Add(Result);
|
IDECodeMacros.Add(Result);
|
||||||
|
@ -492,7 +492,7 @@ begin
|
|||||||
|
|
||||||
for i:=0 to AnchoredControlCount-1 do begin
|
for i:=0 to AnchoredControlCount-1 do begin
|
||||||
CurResizeControl:=AnchoredControls[i];
|
CurResizeControl:=AnchoredControls[i];
|
||||||
debugln('TCustomSplitter.MouseMove ',DbgSName(Self),' CurResizeControl=',DbgSName(CurResizeControl));
|
//debugln('TCustomSplitter.MouseMove ',DbgSName(Self),' CurResizeControl=',DbgSName(CurResizeControl));
|
||||||
if (CurResizeControl.AnchorSide[ResizeAnchor].Control=Self)
|
if (CurResizeControl.AnchorSide[ResizeAnchor].Control=Self)
|
||||||
or (CurResizeControl.AnchorSide[OppositeAnchor[ResizeAnchor]].Control=Self)
|
or (CurResizeControl.AnchorSide[OppositeAnchor[ResizeAnchor]].Control=Self)
|
||||||
then begin
|
then begin
|
||||||
@ -507,7 +507,7 @@ begin
|
|||||||
// calculate how much the CurResizeControl can be enlarged
|
// calculate how much the CurResizeControl can be enlarged
|
||||||
CurMaxEnlarge:=Max(0,GetControlConstraintsMaxSize(CurResizeControl)
|
CurMaxEnlarge:=Max(0,GetControlConstraintsMaxSize(CurResizeControl)
|
||||||
-GetControlSize(CurResizeControl));
|
-GetControlSize(CurResizeControl));
|
||||||
debugln('TCustomSplitter.MouseMove ',DbgSName(Self),' CurResizeControl=',DbgSName(CurResizeControl),' CurMaxShrink=',dbgs(CurMaxShrink),' CurMaxEnlarge=',dbgs(CurMaxEnlarge));
|
//debugln('TCustomSplitter.MouseMove ',DbgSName(Self),' CurResizeControl=',DbgSName(CurResizeControl),' CurMaxShrink=',dbgs(CurMaxShrink),' CurMaxEnlarge=',dbgs(CurMaxEnlarge));
|
||||||
|
|
||||||
// apply to the offset boundaries
|
// apply to the offset boundaries
|
||||||
if (CurResizeControl.AnchorSide[akLeft].Control=Self)
|
if (CurResizeControl.AnchorSide[akLeft].Control=Self)
|
||||||
|
@ -144,6 +144,9 @@ type
|
|||||||
procedure EndUpdate; override;
|
procedure EndUpdate; override;
|
||||||
procedure GetControlBounds(Control: TControl;
|
procedure GetControlBounds(Control: TControl;
|
||||||
out AControlBounds: TRect); override;
|
out AControlBounds: TRect); override;
|
||||||
|
procedure DockControl(Control: TControl; InsertAt: TAlign;
|
||||||
|
DropCtl: TControl);
|
||||||
|
procedure UndockControl(Control: TControl);
|
||||||
procedure InsertControl(Control: TControl; InsertAt: TAlign;
|
procedure InsertControl(Control: TControl; InsertAt: TAlign;
|
||||||
DropCtl: TControl); override;
|
DropCtl: TControl); override;
|
||||||
procedure LoadFromStream(Stream: TStream); override;
|
procedure LoadFromStream(Stream: TStream); override;
|
||||||
@ -712,7 +715,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
procedure TAnchoredDockManager.InsertControl(Control: TControl;
|
procedure TAnchoredDockManager.DockControl(Control: TControl;
|
||||||
InsertAt: TAlign; DropCtl: TControl);
|
InsertAt: TAlign; DropCtl: TControl);
|
||||||
|
|
||||||
Docks Control to or into DropCtl.
|
Docks Control to or into DropCtl.
|
||||||
@ -734,7 +737,7 @@ end;
|
|||||||
and replaces DropCtl and DropCtl is added as page.
|
and replaces DropCtl and DropCtl is added as page.
|
||||||
Then Control is added as page.
|
Then Control is added as page.
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
procedure TAnchoredDockManager.InsertControl(Control: TControl;
|
procedure TAnchoredDockManager.DockControl(Control: TControl;
|
||||||
InsertAt: TAlign; DropCtl: TControl);
|
InsertAt: TAlign; DropCtl: TControl);
|
||||||
var
|
var
|
||||||
Splitter: TLazDockSplitter;
|
Splitter: TLazDockSplitter;
|
||||||
@ -909,6 +912,139 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{-------------------------------------------------------------------------------
|
||||||
|
procedure TAnchoredDockManager.UndockControl(Control: TControl);
|
||||||
|
|
||||||
|
Removes a control from a docking form.
|
||||||
|
It breaks all anchors and cleans up.
|
||||||
|
|
||||||
|
The created gap will be tried to fill up.
|
||||||
|
It removes TLazDockSplitter, TLazDockPage and TLazDockPages if they are no
|
||||||
|
longer needed.
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
procedure TAnchoredDockManager.UndockControl(Control: TControl);
|
||||||
|
{
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
Search Order:
|
||||||
|
|
||||||
|
1. A TLazDockSplitter dividing only two controls:
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|-------------
|
||||||
|
| +--+ | +---
|
||||||
|
| | | | | B
|
||||||
|
| +--+ | +---
|
||||||
|
|-------------
|
||||||
|
|
||||||
|
The splitter will be deleted and the right control will be anchored to the
|
||||||
|
left.
|
||||||
|
|
||||||
|
After:
|
||||||
|
|-------------
|
||||||
|
| +---
|
||||||
|
| | B
|
||||||
|
| +---
|
||||||
|
|-------------
|
||||||
|
|
||||||
|
|
||||||
|
2. Four spiral splitters:
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|
|
||||||
|
A |
|
||||||
|
---------|
|
||||||
|
| +--+ | C
|
||||||
|
B | | | |
|
||||||
|
| +--+ |
|
||||||
|
| ----------
|
||||||
|
| D
|
||||||
|
|
||||||
|
The left and right splitter will be combined to one.
|
||||||
|
|
||||||
|
After:
|
||||||
|
|
|
||||||
|
A |
|
||||||
|
-------|
|
||||||
|
| C
|
||||||
|
B |
|
||||||
|
|
|
||||||
|
|------
|
||||||
|
| D
|
||||||
|
|
||||||
|
|
||||||
|
3. No TLazDockSplitter. Control is the only child of a TLazDockPage
|
||||||
|
In this case the page will be deleted.
|
||||||
|
If the TLazDockPages has no childs left, it is recursively undocked.
|
||||||
|
|
||||||
|
4. No TLazDockSplitter, Control is the only child of a TLazDockForm.
|
||||||
|
The TLazDockForm is deleted and the Control is floated.
|
||||||
|
This normally means: A form will simply be placed on the desktop, other
|
||||||
|
controls will be docked into their DockSite.
|
||||||
|
}
|
||||||
|
var
|
||||||
|
a: TAnchorKind;
|
||||||
|
AnchorControl: TControl;
|
||||||
|
AnchorSplitter: TLazDockSplitter;
|
||||||
|
i: Integer;
|
||||||
|
Sibling: TControl;
|
||||||
|
OldAnchorControls: array[TAnchorKind] of TControl;
|
||||||
|
begin
|
||||||
|
if Control.Parent=nil then begin
|
||||||
|
// already undocked
|
||||||
|
RaiseGDBException('TAnchoredDockManager.UndockControl Control.Parent=nil');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// break anchors
|
||||||
|
Control.Align:=alNone;
|
||||||
|
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||||
|
OldAnchorControls[a]:=Control.AnchorSide[a].Control;
|
||||||
|
Control.AnchorSide[a].Control:=nil;
|
||||||
|
end;
|
||||||
|
Control.Anchors:=[akLeft,akTop];
|
||||||
|
|
||||||
|
// check if their is a splitter, that has a side with only Control anchored
|
||||||
|
// to it.
|
||||||
|
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||||
|
AnchorControl:=OldAnchorControls[a];
|
||||||
|
if AnchorControl is TLazDockSplitter then begin
|
||||||
|
AnchorSplitter:=TLazDockSplitter(AnchorControl);
|
||||||
|
i:=Control.Parent.ControlCount-1;
|
||||||
|
while i>=0 do begin
|
||||||
|
Sibling:=Control.Parent.Controls[i];
|
||||||
|
if (Sibling.AnchorSide[a].Control=AnchorSplitter) then begin
|
||||||
|
// Sibling is anchored with the same side to the splitter
|
||||||
|
// => this splitter is needed, can not be deleted.
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if i<0 then begin
|
||||||
|
// this splitter is not needed anymore
|
||||||
|
RaiseGDBException('');
|
||||||
|
//DeleteSideSplitter(AnchorSplitter,OppositeAnchor[a],
|
||||||
|
// OldAnchorControls[OppositeAnchor[a]]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// check if there are four spiral splitters around Control
|
||||||
|
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||||
|
AnchorControl:=OldAnchorControls[a];
|
||||||
|
if not (AnchorControl is TLazDockSplitter) then begin
|
||||||
|
RaiseGDBException('TAnchoredDockManager.UndockControl neither');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAnchoredDockManager.InsertControl(Control: TControl;
|
||||||
|
InsertAt: TAlign; DropCtl: TControl);
|
||||||
|
begin
|
||||||
|
DockControl(Control, InsertAt, DropCtl);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TAnchoredDockManager.LoadFromStream(Stream: TStream);
|
procedure TAnchoredDockManager.LoadFromStream(Stream: TStream);
|
||||||
begin
|
begin
|
||||||
RaiseGDBException('TAnchoredDockManager.LoadFromStream TODO');
|
RaiseGDBException('TAnchoredDockManager.LoadFromStream TODO');
|
||||||
@ -927,7 +1063,7 @@ end;
|
|||||||
|
|
||||||
procedure TAnchoredDockManager.RemoveControl(Control: TControl);
|
procedure TAnchoredDockManager.RemoveControl(Control: TControl);
|
||||||
begin
|
begin
|
||||||
RaiseGDBException('TAnchoredDockManager.RemoveControl TODO');
|
UndockControl(Control);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAnchoredDockManager.ResetBounds(Force: Boolean);
|
procedure TAnchoredDockManager.ResetBounds(Force: Boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user