IDE: moved compiler options - show lines compiled - to environment options

git-svn-id: trunk@49884 -
This commit is contained in:
mattias 2015-09-27 20:32:15 +00:00
parent 1fe2796bd0
commit 1b88beb01b
7 changed files with 68 additions and 60 deletions

View File

@ -152,7 +152,6 @@ type
procedure SetShowErrors(const AValue: Boolean);
procedure SetShowExecInfo(const AValue: Boolean);
procedure SetShowGenInfo(const AValue: Boolean);
procedure SetShowLinesCompiled(const AValue: Boolean);
procedure SetShowHints(const AValue: Boolean);
procedure SetShowHintsForSenderNotUsed(const AValue: Boolean);
procedure SetShowHintsForUnusedUnitsInMainSrc(const AValue: Boolean);
@ -260,7 +259,6 @@ type
fShowCond: Boolean;
fShowExecInfo: Boolean;
fShowSummary: Boolean;
fShowLinesCompiled: Boolean;
fShowHintsForUnusedUnitsInMainSrc: Boolean;
fShowHintsForSenderNotUsed: Boolean;
fWriteFPCLogo: Boolean;
@ -423,7 +421,6 @@ type
property ShowCond: Boolean read fShowCond write SetShowCond; // -vc
property ShowExecInfo: Boolean read fShowExecInfo write SetShowExecInfo; // -vx
property ShowSummary: Boolean read FShowSummary write SetShowSummary; deprecated; // summary is now always shown (in the header)
property ShowLinesCompiled: Boolean read fShowLinesCompiled write SetShowLinesCompiled;
property ShowHintsForUnusedUnitsInMainSrc: Boolean
read fShowHintsForUnusedUnitsInMainSrc write SetShowHintsForUnusedUnitsInMainSrc;
property ShowHintsForSenderNotUsed: Boolean
@ -740,13 +737,6 @@ begin
IncreaseChangeStamp;
end;
procedure TLazCompilerOptions.SetShowLinesCompiled(const AValue: Boolean);
begin
if fShowLinesCompiled=AValue then Exit;
fShowLinesCompiled:=AValue;
IncreaseChangeStamp;
end;
procedure TLazCompilerOptions.SetStackSize(const AValue: Integer);
begin
if fStackSize=AValue then exit;

View File

@ -337,7 +337,7 @@ begin
Tool.CmdLineParams:=CmdLine;
Tool.Process.CurrentDirectory:=WorkingDir;
FPCParser:=TFPCParser(Tool.AddParsers(SubToolFPC));
FPCParser.ShowLinesCompiled:=AProject.CompilerOptions.ShowLinesCompiled;
FPCParser.ShowLinesCompiled:=EnvironmentOptions.MsgViewShowFPCMsgLinesCompiled;
FPCParser.HideHintsSenderNotUsed:=not AProject.CompilerOptions.ShowHintsForSenderNotUsed;
FPCParser.HideHintsUnitNotUsedInMainSource:=not AProject.CompilerOptions.ShowHintsForUnusedUnitsInMainSrc;
if (not AProject.CompilerOptions.ShowHintsForUnusedUnitsInMainSrc)

View File

@ -1652,7 +1652,6 @@ begin
ShowCond := aXMLConfig.GetValue(p+'Verbosity/ShowCond/Value', false);
ShowExecInfo := aXMLConfig.GetValue(p+'Verbosity/ShowExecInfo/Value', false);
fShowSummary := aXMLConfig.GetValue(p+'Verbosity/ShowSummary/Value', false);
ShowLinesCompiled:=aXMLConfig.GetValue(p+'Verbosity/ShowLinesCompiled/Value', false);
ShowHintsForUnusedUnitsInMainSrc := aXMLConfig.GetValue(p+'Verbosity/ShowHintsForUnusedUnitsInMainSrc/Value', false);
ShowHintsForSenderNotUsed := aXMLConfig.GetValue(p+'Verbosity/ShowHintsForSenderNotUsed/Value', false);
WriteFPCLogo := aXMLConfig.GetValue(p+'WriteFPCLogo/Value', true);
@ -1836,7 +1835,6 @@ begin
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowCond/Value', ShowCond,false);
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowExecInfo/Value', ShowExecInfo,false);
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowSummary/Value', fShowSummary,false);
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowLinesCompiled/Value', ShowLinesCompiled,false);
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowHintsForUnusedUnitsInMainSrc/Value', ShowHintsForUnusedUnitsInMainSrc,false);
aXMLConfig.SetDeleteValue(p+'Verbosity/ShowHintsForSenderNotUsed/Value', ShowHintsForSenderNotUsed,false);
aXMLConfig.SetDeleteValue(p+'WriteFPCLogo/Value', WriteFPCLogo,true);
@ -3264,7 +3262,6 @@ begin
fShowCond := false;
fShowExecInfo := false;
fShowSummary := false;
fShowLinesCompiled := false;
fShowHintsForUnusedUnitsInMainSrc := false;
fShowHintsForSenderNotUsed := false;
fWriteFPCLogo := true;
@ -3377,7 +3374,6 @@ begin
fShowCond := CompOpts.fShowCond;
fShowCond := CompOpts.fShowExecInfo;
fShowSummary := CompOpts.FShowSummary;
fShowLinesCompiled := CompOpts.fShowLinesCompiled;
fShowHintsForUnusedUnitsInMainSrc := CompOpts.fShowHintsForUnusedUnitsInMainSrc;
fShowHintsForSenderNotUsed := CompOpts.fShowHintsForSenderNotUsed;
fWriteFPCLogo := CompOpts.fWriteFPCLogo;
@ -3527,7 +3523,6 @@ begin
if Done(Tool.AddDiff('ShowCond',fShowCond,CompOpts.fShowCond)) then exit;
if Done(Tool.AddDiff('ShowExecInfo',fShowExecInfo,CompOpts.fShowExecInfo)) then exit;
if Done(Tool.AddDiff('ShowSummary',fShowSummary,CompOpts.fShowSummary)) then exit;
if Done(Tool.AddDiff('ShowLinesCompiled',fShowLinesCompiled,CompOpts.fShowLinesCompiled)) then exit;
if Done(Tool.AddDiff('ShowHintsForUnusedUnitsInMainSrc',fShowHintsForUnusedUnitsInMainSrc,CompOpts.fShowHintsForUnusedUnitsInMainSrc)) then exit;
if Done(Tool.AddDiff('ShowHintsForSenderNotUsed',fShowHintsForSenderNotUsed,CompOpts.fShowHintsForSenderNotUsed)) then exit;
if Done(Tool.AddDiff('WriteFPCLogo',fWriteFPCLogo,CompOpts.fWriteFPCLogo)) then exit;

View File

@ -439,6 +439,7 @@ type
FShowCompileDialog: Boolean; // show dialog during compile
FAutoCloseCompileDialog: Boolean; // auto close dialog after succesed compile
FMsgViewFilters: TLMsgViewFilters;
FMsgViewShowFPCMsgLinesCompiled: Boolean;
// compiler + debugger + lazarus files
FParseValues: array[TEnvOptParseType] of TParseString;
@ -783,6 +784,7 @@ type
property MsgViewColors[c: TMsgWndColor]: TColor read GetMsgViewColors write SetMsgViewColors;
property MsgViewFilters: TLMsgViewFilters read FMsgViewFilters;
property MsgColors[u: TMessageLineUrgency]: TColor read GetMsgColors write SetMsgColors;
property MsgViewShowFPCMsgLinesCompiled: Boolean read FMsgViewShowFPCMsgLinesCompiled write FMsgViewShowFPCMsgLinesCompiled;
// glyphs
property ShowButtonGlyphs: TApplicationShowGlyphs read FShowButtonGlyphs write FShowButtonGlyphs;
@ -1284,6 +1286,7 @@ begin
for u:=low(TMessageLineUrgency) to high(TMessageLineUrgency) do
fMsgColors[u] := clDefault;
FMsgViewFilters:=TLMsgViewFilters.Create(nil);
FMsgViewShowFPCMsgLinesCompiled:=false;
// glyphs
FShowButtonGlyphs := sbgSystem;
@ -1697,6 +1700,7 @@ begin
fMsgColors[u] := FXMLCfg.GetValue(
Path+'MsgView/MsgColors/'+dbgs(u),clDefault);
MsgViewFilters.LoadFromXMLConfig(FXMLCfg,'MsgView/Filters/');
FMsgViewShowFPCMsgLinesCompiled:=FXMLCfg.GetValue(Path+'MsgView/FPCMsg/ShowLinesCompiled',false);
// glyphs
FShowButtonGlyphs := TApplicationShowGlyphs(FXMLCfg.GetValue(Path+'ShowButtonGlyphs/Value',
@ -2027,6 +2031,7 @@ begin
FXMLCfg.SetDeleteValue(Path+'MsgView/MsgColors/'+dbgs(u),
fMsgColors[u],clDefault);
MsgViewFilters.SaveToXMLConfig(FXMLCfg,'MsgView/Filters/');
FXMLCfg.SetDeleteValue(Path+'MsgView/FPCMsg/ShowLinesCompiled',FMsgViewShowFPCMsgLinesCompiled,false);
// glyphs
FXMLCfg.SetDeleteValue(Path+'ShowButtonGlyphs/Value',Ord(FShowButtonGlyphs), Ord(sbgSystem));

View File

@ -55,7 +55,6 @@ begin
Items.Add(dlgShowCompiledProcedures + ' (-vp)');
Items.Add(dlgShowEverything + ' (-va)');
Items.Add(dlgWriteFPCLogo + ' (-l)');
Items.Add('Show hint "lines compiled"' + ' ' + dlgPOIconDescNone);
Items.Add(dlgHintsUnused + ' ' + dlgPOIconDescNone);
Items.Add(dlgHintsParameterSenderNotUsed + ' ' + dlgPOIconDescNone);
end;
@ -83,7 +82,6 @@ begin
Checked[i] := ShowCompProc; i+=1;
Checked[i] := ShowAll; i+=1;
Checked[i] := WriteFPCLogo; i+=1;
Checked[i] := ShowLinesCompiled; i+=1;
Checked[i] := ShowHintsForUnusedUnitsInMainSrc; i+=1;
Checked[i] := ShowHintsForSenderNotUsed; i+=1;
@ -110,7 +108,6 @@ begin
ShowCompProc := Checked[i]; i+=1;
ShowAll := Checked[i]; i+=1;
WriteFPCLogo := Checked[i]; i+=1;
ShowLinesCompiled := Checked[i]; i+=1;
ShowHintsForUnusedUnitsInMainSrc := Checked[i]; i+=1;
ShowHintsForSenderNotUsed := Checked[i]; i+=1;

View File

@ -1,10 +1,10 @@
object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 0
Height = 355
Height = 422
Top = 0
Width = 495
ClientHeight = 355
ClientWidth = 495
Width = 520
ClientHeight = 422
ClientWidth = 520
TabOrder = 0
DesignLeft = 386
DesignTop = 221
@ -16,7 +16,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 70
Height = 15
Top = 206
Width = 92
Width = 93
BorderSpacing.Left = 10
BorderSpacing.Top = 6
BorderSpacing.Right = 10
@ -40,10 +40,10 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 172
Left = 173
Height = 3
Top = 212
Width = 323
Width = 347
Anchors = [akTop, akLeft, akRight]
end
object MWShowIconsCheckBox: TCheckBox
@ -51,9 +51,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Control = MWOptionsLabel
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Height = 24
Top = 227
Width = 151
Width = 158
BorderSpacing.Left = 6
Caption = 'MWShowIconsCheckBox'
ParentShowHint = False
@ -65,9 +65,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Control = MWAlwaysDrawFocusedCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 265
Width = 125
Height = 24
Top = 275
Width = 132
BorderSpacing.Left = 6
Caption = 'MWFocusCheckBox'
ParentShowHint = False
@ -79,9 +79,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Control = MWShowIconsCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 246
Width = 202
Height = 24
Top = 251
Width = 212
Caption = 'MWAlwaysDrawFocusedCheckBox'
ParentShowHint = False
ShowHint = True
@ -92,9 +92,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = MWFocusCheckBox
AnchorSideTop.Side = asrBottom
Left = 109
Height = 23
Top = 284
Left = 110
Height = 25
Top = 299
Width = 50
BorderSpacing.Left = 2
TabOrder = 3
@ -105,8 +105,8 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 288
Width = 101
Top = 304
Width = 102
BorderSpacing.Left = 6
Caption = 'MWMaxProcsLabel'
ParentColor = False
@ -115,7 +115,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 0
Height = 26
Top = 0
Width = 495
Width = 520
Caption = 'ToolBar1'
ShowCaptions = True
TabOrder = 4
@ -130,7 +130,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Style = tbsCheck
end
object BtnMsgColor: TToolButton
Left = 94
Left = 98
Top = 2
AllowAllUp = True
Caption = 'BtnMsgColor'
@ -148,7 +148,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 0
Height = 174
Top = 26
Width = 495
Width = 520
PageIndex = 0
Anchors = [akTop, akLeft, akRight]
TabOrder = 5
@ -158,12 +158,12 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 0
Height = 174
Top = 0
Width = 495
Width = 520
Align = alClient
Anchors = [akTop, akLeft, akRight]
Caption = 'MWColorsGroupBox'
ClientHeight = 154
ClientWidth = 491
ClientHeight = 157
ClientWidth = 516
TabOrder = 0
object MWColorListBox: TColorListBox
AnchorSideLeft.Control = MWColorsGroupBox
@ -173,7 +173,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Left = 6
Height = 110
Top = 6
Width = 303
Width = 328
Style = [cbCustomColors]
OnGetColors = MWColorListBoxGetColors
Anchors = [akTop, akLeft, akRight]
@ -181,6 +181,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
ItemHeight = 0
OnSelectionChange = MWColorListBoxSelectionChange
TabOrder = 0
TopIndex = -1
end
object MWColorBox: TColorBox
AnchorSideLeft.Control = MWColorsGroupBox
@ -190,9 +191,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideBottom.Control = MWColorsGroupBox
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 26
Height = 29
Top = 122
Width = 303
Width = 328
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors]
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
@ -201,8 +202,8 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
TabOrder = 1
end
object MWSpeedSetColorsGroupBox: TGroupBox
Left = 315
Height = 142
Left = 340
Height = 145
Top = 6
Width = 170
Align = alRight
@ -210,14 +211,14 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Caption = 'MWSpeedSetColorsGroupBox'
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 122
ClientHeight = 128
ClientWidth = 166
TabOrder = 2
object MWSetEditorColorsButton: TButton
Left = 0
Height = 25
Height = 27
Top = 0
Width = 172
Width = 166
AutoSize = True
Caption = 'MWSetEditorColorsButton'
OnClick = MWSetEditorColorsButtonClick
@ -227,9 +228,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 25
Top = 31
Width = 172
Height = 27
Top = 33
Width = 166
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.Right = 6
@ -239,9 +240,9 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
end
object MWSetPastelColorsButton: TButton
Left = 0
Height = 25
Top = 62
Width = 172
Height = 27
Top = 66
Width = 166
AutoSize = True
BorderSpacing.Top = 6
Caption = 'MWSetPastelColorsButton'
@ -259,7 +260,7 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
Width = 495
Align = alClient
Caption = 'MsgColorGroupBox'
ClientHeight = 154
ClientHeight = 157
ClientWidth = 491
TabOrder = 0
object MsgColorListBox: TColorListBox
@ -296,4 +297,19 @@ object MsgWndOptionsFrame: TMsgWndOptionsFrame
end
end
end
object MWShowFPCMsgLinesCompiledCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MWMaxProcsSpinEdit
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 334
Width = 251
BorderSpacing.Left = 6
BorderSpacing.Top = 10
Caption = 'MWShowFPCMsgLinesCompiledCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
end

View File

@ -46,6 +46,7 @@ type
MWAlwaysDrawFocusedCheckBox: TCheckBox;
MWFocusCheckBox: TCheckBox;
MWSetPastelColorsButton: TButton;
MWShowFPCMsgLinesCompiledCheckBox: TCheckBox;
MWShowIconsCheckBox: TCheckBox;
MWMaxProcsLabel: TLabel;
MWMaxProcsSpinEdit: TSpinEdit;
@ -250,6 +251,8 @@ begin
MWFocusCheckBox.Caption:=dlgEOFocusMessagesAfterCompilation;
MWMaxProcsLabel.Caption:=Format(lisMaximumParallelProcesses0MeansDefault, [
IntToStr(DefaultMaxProcessCount)]);
MWShowFPCMsgLinesCompiledCheckBox.Caption:='Show FPC message "lines compiled"';
MWShowFPCMsgLinesCompiledCheckBox.Hint:='Elevate the message priority to always show it (by default it has low priority "verbose")';
Notebook1.PageIndex := 0;
end;
@ -280,6 +283,7 @@ begin
MWAlwaysDrawFocusedCheckBox.Checked := o.MsgViewAlwaysDrawFocused;
MWFocusCheckBox.Checked := o.MsgViewFocus;
MWMaxProcsSpinEdit.Value := o.MaxExtToolsInParallel;
MWShowFPCMsgLinesCompiledCheckBox.Checked := o.MsgViewShowFPCMsgLinesCompiled;
fReady:=true;
end;
@ -298,6 +302,7 @@ begin
o.MsgViewAlwaysDrawFocused := MWAlwaysDrawFocusedCheckBox.Checked;
o.MsgViewFocus := MWFocusCheckBox.Checked;
o.MaxExtToolsInParallel := MWMaxProcsSpinEdit.Value;
o.MsgViewShowFPCMsgLinesCompiled := MWShowFPCMsgLinesCompiledCheckBox.Checked;
end;
class function TMsgWndOptionsFrame.