mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +02:00
CodeTools: center jumps with a percent value. Add settings for code block jump as well.
git-svn-id: trunk@55030 -
This commit is contained in:
parent
c2b1fef6d5
commit
a5c8984ec7
@ -114,7 +114,8 @@ type
|
||||
FErrorTopLine: integer;
|
||||
FCodeTreeNodesDeletedStep: integer;
|
||||
FIndentSize: integer;
|
||||
FJumpCentered: boolean;
|
||||
FJumpSingleLinePos: integer;
|
||||
FJumpCodeBlockPos: integer;
|
||||
FIdentifierListUpdating: boolean;
|
||||
FOnAfterApplyChanges: TOnAfterApplyCTChanges;
|
||||
FOnBeforeApplyChanges: TOnBeforeApplyCTChanges;
|
||||
@ -169,7 +170,8 @@ type
|
||||
procedure SetTabWidth(const AValue: integer);
|
||||
procedure SetUseTabs(AValue: boolean);
|
||||
procedure SetVisibleEditorLines(NewValue: integer);
|
||||
procedure SetJumpCentered(NewValue: boolean);
|
||||
procedure SetJumpSingleLinePos(NewValue: integer);
|
||||
procedure SetJumpCodeBlockPos(NewValue: integer);
|
||||
procedure SetCursorBeyondEOL(NewValue: boolean);
|
||||
procedure BeforeApplyingChanges(var Abort: boolean);
|
||||
procedure AfterApplyingChanges;
|
||||
@ -303,7 +305,8 @@ type
|
||||
property CursorBeyondEOL: boolean read FCursorBeyondEOL
|
||||
write SetCursorBeyondEOL;
|
||||
property IndentSize: integer read FIndentSize write SetIndentSize;
|
||||
property JumpCentered: boolean read FJumpCentered write SetJumpCentered;
|
||||
property JumpSingleLinePos: integer read FJumpSingleLinePos write SetJumpSingleLinePos;
|
||||
property JumpCodeBlockPos: integer read FJumpCodeBlockPos write SetJumpCodeBlockPos;
|
||||
property SetPropertyVariablename: string
|
||||
read FSetPropertyVariablename write SetSetPropertyVariablename;
|
||||
property SetPropertyVariableIsPrefix: Boolean
|
||||
@ -1024,7 +1027,8 @@ begin
|
||||
FCompleteProperties:=true;
|
||||
FCursorBeyondEOL:=true;
|
||||
FIndentSize:=2;
|
||||
FJumpCentered:=true;
|
||||
FJumpSingleLinePos:=50;
|
||||
FJumpSingleLinePos:=0;
|
||||
FSourceExtensions:='.pp;.pas;.p;.lpr;.lpk;.dpr;.dpk';
|
||||
FVisibleEditorLines:=20;
|
||||
FWriteExceptions:=true;
|
||||
@ -1871,8 +1875,8 @@ begin
|
||||
// adjust error topline
|
||||
if (fErrorCode<>nil) and (fErrorTopLine<1) then begin
|
||||
fErrorTopLine:=fErrorLine;
|
||||
if (fErrorTopLine>0) and JumpCentered then begin
|
||||
dec(fErrorTopLine,VisibleEditorLines div 2);
|
||||
if (fErrorTopLine>0) and (JumpSingleLinePos>0) then begin
|
||||
dec(fErrorTopLine,VisibleEditorLines*JumpSingleLinePos div 100);
|
||||
if fErrorTopLine<1 then fErrorTopLine:=1;
|
||||
end;
|
||||
end;
|
||||
@ -5925,12 +5929,20 @@ begin
|
||||
FCurCodeTool.VisibleEditorLines:=NewValue;
|
||||
end;
|
||||
|
||||
procedure TCodeToolManager.SetJumpCentered(NewValue: boolean);
|
||||
procedure TCodeToolManager.SetJumpSingleLinePos(NewValue: integer);
|
||||
begin
|
||||
if NewValue=FJumpCentered then exit;
|
||||
FJumpCentered:=NewValue;
|
||||
if NewValue=FJumpSingleLinePos then exit;
|
||||
FJumpSingleLinePos:=NewValue;
|
||||
if FCurCodeTool<>nil then
|
||||
FCurCodeTool.JumpCentered:=NewValue;
|
||||
FCurCodeTool.JumpSingleLinePos:=NewValue;
|
||||
end;
|
||||
|
||||
procedure TCodeToolManager.SetJumpCodeBlockPos(NewValue: integer);
|
||||
begin
|
||||
if NewValue=FJumpCodeBlockPos then exit;
|
||||
FJumpCodeBlockPos:=NewValue;
|
||||
if FCurCodeTool<>nil then
|
||||
FCurCodeTool.JumpCodeBlockPos:=NewValue;
|
||||
end;
|
||||
|
||||
procedure TCodeToolManager.SetSetPropertyVariableIsPrefix(aValue: Boolean);
|
||||
@ -6061,7 +6073,8 @@ begin
|
||||
Result.CheckFilesOnDisk:=FCheckFilesOnDisk;
|
||||
Result.IndentSize:=FIndentSize;
|
||||
Result.VisibleEditorLines:=FVisibleEditorLines;
|
||||
Result.JumpCentered:=FJumpCentered;
|
||||
Result.JumpSingleLinePos:=FJumpSingleLinePos;
|
||||
Result.JumpCodeBlockPos:=FJumpCodeBlockPos;
|
||||
Result.CursorBeyondEOL:=FCursorBeyondEOL;
|
||||
end;
|
||||
|
||||
|
@ -159,7 +159,8 @@ type
|
||||
CheckFilesOnDisk: boolean;
|
||||
IndentSize: integer;
|
||||
VisibleEditorLines: integer;
|
||||
JumpCentered: boolean;
|
||||
JumpSingleLinePos: integer; // in percent 0..100
|
||||
JumpCodeBlockPos: integer; // in percent 0..100
|
||||
CursorBeyondEOL: boolean;
|
||||
|
||||
ErrorPosition: TCodeXYPosition;
|
||||
@ -2709,8 +2710,8 @@ begin
|
||||
NewTopLine:=0;
|
||||
Result:=CleanPosToCaret(CleanPos,Caret);
|
||||
if Result then begin
|
||||
if JumpCentered then begin
|
||||
NewTopLine:=Caret.Y-(VisibleEditorLines shr 1);
|
||||
if JumpSingleLinePos>0 then begin
|
||||
NewTopLine:=Caret.Y-(VisibleEditorLines*JumpSingleLinePos div 100);
|
||||
if NewTopLine<1 then NewTopLine:=1;
|
||||
end else
|
||||
NewTopLine:=Caret.Y;
|
||||
|
@ -1031,11 +1031,11 @@ type
|
||||
|
||||
function JumpToNode(ANode: TCodeTreeNode;
|
||||
out NewPos: TCodeXYPosition; out NewTopLine: integer;
|
||||
IgnoreJumpCentered: boolean): boolean;
|
||||
IsCodeBlock: boolean): boolean;
|
||||
function JumpToCleanPos(NewCleanPos, NewTopLineCleanPos,
|
||||
NewBottomLineCleanPos: integer;
|
||||
out NewPos: TCodeXYPosition; out NewTopLine: integer;
|
||||
IgnoreJumpCentered: boolean): boolean;
|
||||
IsCodeBlock: boolean): boolean;
|
||||
function NodeIsForwardDeclaration(Node: TCodeTreeNode): boolean;
|
||||
|
||||
function GetExpandedOperand(const CursorPos: TCodeXYPosition;
|
||||
@ -6871,7 +6871,7 @@ end;
|
||||
|
||||
function TFindDeclarationTool.JumpToNode(ANode: TCodeTreeNode;
|
||||
out NewPos: TCodeXYPosition; out NewTopLine: integer;
|
||||
IgnoreJumpCentered: boolean): boolean;
|
||||
IsCodeBlock: boolean): boolean;
|
||||
var
|
||||
JumpPos: LongInt;
|
||||
begin
|
||||
@ -6884,16 +6884,16 @@ begin
|
||||
JumpPos:=CurPos.StartPos;
|
||||
end;
|
||||
Result:=JumpToCleanPos(JumpPos,JumpPos,ANode.EndPos,
|
||||
NewPos,NewTopLine,IgnoreJumpCentered);
|
||||
NewPos,NewTopLine,IsCodeBlock);
|
||||
end;
|
||||
|
||||
function TFindDeclarationTool.JumpToCleanPos(NewCleanPos, NewTopLineCleanPos,
|
||||
NewBottomLineCleanPos: integer; out NewPos: TCodeXYPosition;
|
||||
out NewTopLine: integer; IgnoreJumpCentered: boolean): boolean;
|
||||
out NewTopLine: integer; IsCodeBlock: boolean): boolean;
|
||||
var
|
||||
CenteredTopLine: integer;
|
||||
NewTopLinePos: TCodeXYPosition;
|
||||
NewBottomLinePos: TCodeXYPosition;
|
||||
JumpPos: Integer;
|
||||
begin
|
||||
Result:=false;
|
||||
// convert clean position to line, column and code
|
||||
@ -6921,14 +6921,21 @@ begin
|
||||
and (not CleanPosToCaret(NewBottomLineCleanPos,NewBottomLinePos)) then exit;
|
||||
|
||||
if NewTopLinePos.Code=NewPos.Code then begin
|
||||
// top line position is in the same code as the destination position
|
||||
NewTopLine:=NewTopLinePos.Y;
|
||||
CenteredTopLine:=NewPos.Y-VisibleEditorLines div 2;
|
||||
if JumpCentered and (not IgnoreJumpCentered) then begin
|
||||
// center the destination position in the source editor
|
||||
if CenteredTopLine<NewTopLine then
|
||||
NewTopLine:=CenteredTopLine;
|
||||
end;
|
||||
// center the destination position in the source editor
|
||||
if IsCodeBlock and (JumpCodeBlockPos>0) then
|
||||
JumpPos := JumpCodeBlockPos
|
||||
else
|
||||
if not IsCodeBlock and (JumpSingleLinePos>0) then
|
||||
JumpPos := JumpSingleLinePos
|
||||
else
|
||||
JumpPos := 0;
|
||||
if JumpPos>0 then
|
||||
NewTopLine:=NewTopLinePos.Y-((VisibleEditorLines-(NewBottomLinePos.Y-NewTopLinePos.Y))*JumpPos div 100)
|
||||
else
|
||||
NewTopLine:=High(NewTopLine);
|
||||
if NewTopLine>NewTopLinePos.Y then
|
||||
NewTopLine:=NewTopLinePos.Y;
|
||||
|
||||
// NewTopLine not above first line of code
|
||||
if NewTopLine<1 then NewTopLine:=1;
|
||||
// make NewTopLine visible
|
||||
@ -6942,7 +6949,7 @@ begin
|
||||
NewTopLine:=NewBottomLinePos.Y-VisibleEditorLines+1;
|
||||
end else begin
|
||||
// center
|
||||
NewTopLine:=CenteredTopLine;
|
||||
NewTopLine:=NewPos.Y-(VisibleEditorLines*JumpSingleLinePos div 100);
|
||||
end;
|
||||
if NewTopLine<1 then NewTopLine:=1;
|
||||
end;
|
||||
|
@ -6321,8 +6321,8 @@ begin
|
||||
if Result then begin
|
||||
NewPos.Code:=TCodeBuffer(EndCode);
|
||||
NewPos.Code.AbsoluteToLineCol(EndCursorPos,NewPos.Y,NewPos.X);
|
||||
if JumpCentered then begin
|
||||
NewTopLine:=NewPos.Y-(VisibleEditorLines shr 1);
|
||||
if JumpSingleLinePos>0 then begin
|
||||
NewTopLine:=NewPos.Y-(VisibleEditorLines*JumpSingleLinePos div 100);
|
||||
if NewTopLine<1 then NewTopLine:=1;
|
||||
end else
|
||||
NewTopLine:=NewPos.Y;
|
||||
|
@ -63,7 +63,8 @@ type
|
||||
FAdjustTopLineDueToComment: boolean;
|
||||
FIdentComplSortForHistory: boolean;
|
||||
FIdentComplSortForScope: boolean;
|
||||
FJumpCentered: boolean;
|
||||
FJumpSingleLinePos: integer;
|
||||
FJumpCodeBlockPos: integer;
|
||||
FCursorBeyondEOL: boolean;
|
||||
FSkipForwardDeclarations: boolean;
|
||||
FJumpToMethodBody: boolean;
|
||||
@ -149,7 +150,8 @@ type
|
||||
// General
|
||||
property AdjustTopLineDueToComment: boolean
|
||||
read FAdjustTopLineDueToComment write FAdjustTopLineDueToComment;
|
||||
property JumpCentered: boolean read FJumpCentered write FJumpCentered;
|
||||
property JumpSingleLinePos: integer read FJumpSingleLinePos write FJumpSingleLinePos;
|
||||
property JumpCodeBlockPos: integer read FJumpCodeBlockPos write FJumpCodeBlockPos;
|
||||
property CursorBeyondEOL: boolean
|
||||
read FCursorBeyondEOL write FCursorBeyondEOL;
|
||||
property SkipForwardDeclarations: boolean read FSkipForwardDeclarations write FSkipForwardDeclarations;
|
||||
@ -275,7 +277,7 @@ implementation
|
||||
{$R lazarus_indentation.res}
|
||||
|
||||
const
|
||||
CodeToolsOptionsVersion = 1;
|
||||
CodeToolsOptionsVersion = 2;
|
||||
DefaultCodeToolsOptsFile = 'codetoolsoptions.xml';
|
||||
|
||||
function GetTranslatedAtomTypes(a: TAtomType): string;
|
||||
@ -390,6 +392,7 @@ procedure TCodeToolsOptions.Load;
|
||||
var
|
||||
XMLConfig: TXMLConfig;
|
||||
FileVersion: integer;
|
||||
AJumpCentered: Boolean;
|
||||
|
||||
procedure LoadGlobalDefineTemplates;
|
||||
begin
|
||||
@ -420,8 +423,20 @@ begin
|
||||
// General
|
||||
FAdjustTopLineDueToComment:=XMLConfig.GetValue(
|
||||
'CodeToolsOptions/AdjustTopLineDueToComment/Value',true);
|
||||
FJumpCentered:=XMLConfig.GetValue('CodeToolsOptions/JumpCentered/Value',
|
||||
true);
|
||||
if FileVersion<2 then
|
||||
begin
|
||||
AJumpCentered:=XMLConfig.GetValue('CodeToolsOptions/JumpCentered/Value',
|
||||
true);
|
||||
if AJumpCentered then
|
||||
FJumpSingleLinePos := 50
|
||||
else
|
||||
FJumpSingleLinePos := 0;
|
||||
FJumpCodeBlockPos := 0;
|
||||
end else
|
||||
begin
|
||||
FJumpSingleLinePos:=XMLConfig.GetValue('CodeToolsOptions/JumpSingleLinePos/Value', 50);
|
||||
FJumpCodeBlockPos:=XMLConfig.GetValue('CodeToolsOptions/JumpCodeBlockPos/Value', 0);
|
||||
end;
|
||||
FCursorBeyondEOL:=XMLConfig.GetValue(
|
||||
'CodeToolsOptions/CursorBeyondEOL/Value',true);
|
||||
FSkipForwardDeclarations:=XMLConfig.GetValue(
|
||||
@ -578,8 +593,10 @@ begin
|
||||
// General
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/AdjustTopLineDueToComment/Value',
|
||||
FAdjustTopLineDueToComment,true);
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/JumpCentered/Value',
|
||||
FJumpCentered,true);
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/JumpSingleLinePos/Value',
|
||||
FJumpSingleLinePos,50);
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/JumpCodeBlockPos/Value',
|
||||
FJumpCodeBlockPos,0);
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/CursorBeyondEOL/Value',
|
||||
FCursorBeyondEOL,true);
|
||||
XMLConfig.SetDeleteValue('CodeToolsOptions/SkipForwardDeclarations/Value',
|
||||
@ -778,7 +795,8 @@ begin
|
||||
begin
|
||||
// General
|
||||
FAdjustTopLineDueToComment:=CodeToolsOpts.FAdjustTopLineDueToComment;
|
||||
FJumpCentered:=CodeToolsOpts.FJumpCentered;
|
||||
FJumpSingleLinePos:=CodeToolsOpts.FJumpSingleLinePos;
|
||||
FJumpCodeBlockPos:=CodeToolsOpts.FJumpCodeBlockPos;
|
||||
FCursorBeyondEOL:=CodeToolsOpts.FCursorBeyondEOL;
|
||||
FAddInheritedCodeToOverrideMethod:=CodeToolsOpts.AddInheritedCodeToOverrideMethod;
|
||||
FCompleteProperties:=CodeToolsOpts.CompleteProperties;
|
||||
@ -847,7 +865,8 @@ procedure TCodeToolsOptions.Clear;
|
||||
begin
|
||||
// General
|
||||
FAdjustTopLineDueToComment:=true;
|
||||
FJumpCentered:=true;
|
||||
FJumpSingleLinePos:=50;
|
||||
FJumpCodeBlockPos:=0;
|
||||
FCursorBeyondEOL:=true;
|
||||
|
||||
// define templates
|
||||
@ -926,7 +945,8 @@ begin
|
||||
Result:=
|
||||
// General
|
||||
(FAdjustTopLineDueToComment=CodeToolsOpts.FAdjustTopLineDueToComment)
|
||||
and (FJumpCentered=CodeToolsOpts.FJumpCentered)
|
||||
and (FJumpSingleLinePos=CodeToolsOpts.FJumpSingleLinePos)
|
||||
and (FJumpCodeBlockPos=CodeToolsOpts.FJumpCodeBlockPos)
|
||||
and (FCursorBeyondEOL=CodeToolsOpts.FCursorBeyondEOL)
|
||||
and (AddInheritedCodeToOverrideMethod=CodeToolsOpts.AddInheritedCodeToOverrideMethod)
|
||||
and (CompleteProperties=CodeToolsOpts.CompleteProperties)
|
||||
@ -1038,7 +1058,8 @@ begin
|
||||
begin
|
||||
// General - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
Boss.AdjustTopLineDueToComment:=AdjustTopLineDueToComment;
|
||||
Boss.JumpCentered:=JumpCentered;
|
||||
Boss.JumpSingleLinePos:=JumpSingleLinePos;
|
||||
Boss.JumpCodeBlockPos:=JumpCodeBlockPos;
|
||||
Boss.CursorBeyondEOL:=CursorBeyondEOL;
|
||||
Boss.AddInheritedCodeToOverrideMethod:=AddInheritedCodeToOverrideMethod;
|
||||
Boss.CompleteProperties:=CompleteProperties;
|
||||
|
@ -13,7 +13,7 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 149
|
||||
Height = 157
|
||||
Top = 6
|
||||
Width = 552
|
||||
Align = alTop
|
||||
@ -22,68 +22,104 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
Caption = 'JumpingGroupBox'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ClientHeight = 132
|
||||
ClientHeight = 137
|
||||
ClientWidth = 548
|
||||
TabOrder = 0
|
||||
object AdjustTopLineDueToCommentCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = JumpingGroupBox
|
||||
Left = 6
|
||||
Height = 24
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 247
|
||||
Width = 238
|
||||
Caption = 'AdjustTopLineDueToCommentCheckBox'
|
||||
TabOrder = 0
|
||||
end
|
||||
object JumpCenteredCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = AdjustTopLineDueToCommentCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 30
|
||||
Width = 162
|
||||
Caption = 'JumpCenteredCheckBox'
|
||||
TabOrder = 1
|
||||
end
|
||||
object CursorBeyondEOLCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = JumpCenteredCheckBox
|
||||
AnchorSideTop.Control = JumpCodeBlockPosEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 54
|
||||
Width = 179
|
||||
Height = 19
|
||||
Top = 74
|
||||
Width = 168
|
||||
Caption = 'CursorBeyondEOLCheckBox'
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
object SkipForwardDeclarationsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = CursorBeyondEOLCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 78
|
||||
Width = 216
|
||||
Height = 19
|
||||
Top = 93
|
||||
Width = 202
|
||||
Caption = 'SkipForwardDeclarationsCheckBox'
|
||||
TabOrder = 3
|
||||
TabOrder = 2
|
||||
end
|
||||
object JumpToMethodBodyCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = SkipForwardDeclarationsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 102
|
||||
Width = 194
|
||||
Height = 19
|
||||
Top = 112
|
||||
Width = 184
|
||||
Caption = 'JumpToMethodBodyCheckBox'
|
||||
TabOrder = 3
|
||||
end
|
||||
object JumpSingleLinePosLabel: TLabel
|
||||
AnchorSideLeft.Control = JumpSingleLinePosEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = JumpSingleLinePosEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 61
|
||||
Height = 15
|
||||
Top = 29
|
||||
Width = 130
|
||||
BorderSpacing.Left = 5
|
||||
Caption = 'JumpSingleLinePosLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object JumpSingleLinePosEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = AdjustTopLineDueToCommentCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 25
|
||||
Width = 50
|
||||
TabOrder = 4
|
||||
end
|
||||
object JumpCodeBlockPosEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = JumpingGroupBox
|
||||
AnchorSideTop.Control = JumpSingleLinePosEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 51
|
||||
Width = 50
|
||||
BorderSpacing.Top = 3
|
||||
TabOrder = 5
|
||||
end
|
||||
object JumpCodeBlockPosLabel: TLabel
|
||||
AnchorSideLeft.Control = JumpCodeBlockPosEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = JumpCodeBlockPosEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 61
|
||||
Height = 15
|
||||
Top = 55
|
||||
Width = 133
|
||||
BorderSpacing.Left = 5
|
||||
Caption = 'JumpCodeBlockPosLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object IndentationGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 150
|
||||
Top = 161
|
||||
Height = 151
|
||||
Top = 169
|
||||
Width = 552
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -91,7 +127,7 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
Caption = 'IndentationGroupBox'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ClientHeight = 133
|
||||
ClientHeight = 131
|
||||
ClientWidth = 548
|
||||
TabOrder = 1
|
||||
object IndentFileLabel: TLabel
|
||||
@ -100,7 +136,7 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 107
|
||||
Width = 84
|
||||
Width = 80
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'IndentFileLabel'
|
||||
ParentColor = False
|
||||
@ -110,9 +146,9 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
AnchorSideTop.Control = IndentOnPasteCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 69
|
||||
Width = 209
|
||||
Height = 19
|
||||
Top = 59
|
||||
Width = 193
|
||||
Caption = 'IndentContextSensitiveCheckBox'
|
||||
TabOrder = 2
|
||||
end
|
||||
@ -121,9 +157,9 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
AnchorSideTop.Control = GeneralAutoIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Height = 19
|
||||
Top = 21
|
||||
Width = 187
|
||||
Width = 173
|
||||
Caption = 'IndentOnLineBreakCheckBox'
|
||||
OnChange = IndentOnLineBreakCheckBoxChange
|
||||
TabOrder = 0
|
||||
@ -133,9 +169,9 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
AnchorSideTop.Control = IndentOnLineBreakCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 45
|
||||
Width = 162
|
||||
Height = 19
|
||||
Top = 40
|
||||
Width = 150
|
||||
Caption = 'IndentOnPasteCheckBox'
|
||||
OnChange = IndentOnPasteCheckBoxChange
|
||||
TabOrder = 1
|
||||
@ -145,7 +181,7 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 6
|
||||
Width = 106
|
||||
Width = 100
|
||||
Caption = 'GeneralAutoIndent'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
@ -160,10 +196,10 @@ object CodetoolsGeneralOptionsFrame: TCodetoolsGeneralOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = IndentationGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 96
|
||||
Height = 25
|
||||
Left = 92
|
||||
Height = 23
|
||||
Top = 102
|
||||
Width = 446
|
||||
Width = 450
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 50
|
||||
|
@ -26,7 +26,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, Buttons,
|
||||
Dialogs, ExtCtrls, Graphics, EditBtn,
|
||||
Dialogs, ExtCtrls, Graphics, EditBtn, Spin,
|
||||
CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf;
|
||||
|
||||
type
|
||||
@ -42,11 +42,14 @@ type
|
||||
CursorBeyondEOLCheckBox: TCheckBox;
|
||||
IndentFileEdit: TFileNameEdit;
|
||||
IndentationGroupBox: TGroupBox;
|
||||
JumpCenteredCheckBox: TCheckBox;
|
||||
JumpingGroupBox: TGroupBox;
|
||||
IndentFileLabel: TLabel;
|
||||
JumpToMethodBodyCheckBox: TCheckBox;
|
||||
SkipForwardDeclarationsCheckBox: TCheckBox;
|
||||
JumpSingleLinePosLabel: TLabel;
|
||||
JumpSingleLinePosEdit: TSpinEdit;
|
||||
JumpCodeBlockPosEdit: TSpinEdit;
|
||||
JumpCodeBlockPosLabel: TLabel;
|
||||
procedure GeneralAutoIndentClick(Sender: TObject);
|
||||
procedure GeneralAutoIndentMouseEnter(Sender: TObject);
|
||||
procedure GeneralAutoIndentMouseLeave(Sender: TObject);
|
||||
@ -118,7 +121,8 @@ begin
|
||||
|
||||
JumpingGroupBox.Caption:=dlgJumpingETC;
|
||||
AdjustTopLineDueToCommentCheckBox.Caption:=dlgAdjustTopLine;
|
||||
JumpCenteredCheckBox.Caption:=dlgcentercursorline;
|
||||
JumpSingleLinePosLabel.Caption:=dlgJumpSingleLinePos;
|
||||
JumpCodeBlockPosLabel.Caption:=dlgJumpCodeBlockPos;
|
||||
CursorBeyondEOLCheckBox.Caption:=dlgcursorbeyondeol;
|
||||
SkipForwardDeclarationsCheckBox.Caption:=dlgSkipForwardClassDeclarations;
|
||||
JumpToMethodBodyCheckBox.Caption := dlgJumpToMethodBody;
|
||||
@ -141,7 +145,8 @@ begin
|
||||
with AOptions as TCodeToolsOptions do
|
||||
begin
|
||||
AdjustTopLineDueToCommentCheckBox.Checked := AdjustTopLineDueToComment;
|
||||
JumpCenteredCheckBox.Checked := JumpCentered;
|
||||
JumpCodeBlockPosEdit.Value := JumpCodeBlockPos;
|
||||
JumpSingleLinePosEdit.Value := JumpSingleLinePos;
|
||||
CursorBeyondEOLCheckBox.Checked := CursorBeyondEOL;
|
||||
SkipForwardDeclarationsCheckBox.Checked := SkipForwardDeclarations;
|
||||
JumpToMethodBodyCheckBox.Checked := JumpToMethodBody;
|
||||
@ -158,7 +163,8 @@ begin
|
||||
with AOptions as TCodeToolsOptions do
|
||||
begin
|
||||
AdjustTopLineDueToComment := AdjustTopLineDueToCommentCheckBox.Checked;
|
||||
JumpCentered := JumpCenteredCheckBox.Checked;
|
||||
JumpCodeBlockPos := JumpCodeBlockPosEdit.Value;
|
||||
JumpSingleLinePos := JumpSingleLinePosEdit.Value;
|
||||
CursorBeyondEOL := CursorBeyondEOLCheckBox.Checked;
|
||||
SkipForwardDeclarations := SkipForwardDeclarationsCheckBox.Checked;
|
||||
JumpToMethodBody:=JumpToMethodBodyCheckBox.Checked;
|
||||
|
@ -2157,7 +2157,8 @@ resourcestring
|
||||
dlgIdentifierCompletion = 'Identifier Completion';
|
||||
dlgJumpingETC = 'Jumping (e.g. Method Jumping)';
|
||||
dlgAdjustTopLine = 'Adjust top line due to comment in front';
|
||||
dlgCenterCursorLine = 'Center cursor line';
|
||||
dlgJumpSingleLinePos = 'Vertical position for a single line jump in %. (0=top, 100=bottom)';
|
||||
dlgJumpCodeBlockPos = 'Vertical position for a code block jump in %. (0=top, 100=bottom)';
|
||||
dlgCursorBeyondEOL = 'Cursor beyond EOL';
|
||||
dlgSkipForwardClassDeclarations = 'Skip forward class declarations';
|
||||
dlgJumpToMethodBody = 'Jump directly to method body';
|
||||
|
Loading…
Reference in New Issue
Block a user