mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +02:00
IdeDebugger: remove DisplayFormat-filter from Valueformatter. (value formatter can now be disabled in watch properties)
This commit is contained in:
parent
1eae051544
commit
a31c9b11d7
@ -45,8 +45,6 @@ type
|
||||
): boolean; experimental; deprecated 'For values from older backends only - to be removed as backends are upgraded';
|
||||
|
||||
function SupportedFeatures: TLazDbgIdeValFormatterFeatures;
|
||||
function SupportedDisplayFormatFilters: TValueDisplayFormatGroups;
|
||||
function SupportedDisplayFormatCategories: TValueDisplayFormatCategories;
|
||||
|
||||
// Config
|
||||
function GetObject: TObject; // for TXmlConfig.WriteObject / must have all config in published fields
|
||||
@ -117,11 +115,6 @@ type
|
||||
): boolean; virtual; experimental; deprecated 'For values from older backends only - to be removed as backends are upgraded';
|
||||
|
||||
function SupportedFeatures: TLazDbgIdeValFormatterFeatures; virtual;
|
||||
(* SupportedDisplayFormatFilters / SupportedDisplayFormatCategories
|
||||
must return a fixed result per instance / must not change
|
||||
*)
|
||||
function SupportedDisplayFormatFilters: TValueDisplayFormatGroups; virtual;
|
||||
function SupportedDisplayFormatCategories: TValueDisplayFormatCategories; virtual;
|
||||
end;
|
||||
|
||||
{ TLazDbgIdeValueFormatterRegistryEntryGeneric }
|
||||
@ -239,16 +232,6 @@ begin
|
||||
Result := [vffValueData];
|
||||
end;
|
||||
|
||||
function TLazDbgIdeValueFormatterGeneric.SupportedDisplayFormatFilters: TValueDisplayFormatGroups;
|
||||
begin
|
||||
Result := [low(TValueDisplayFormatGroups)..high(TValueDisplayFormatGroups)];
|
||||
end;
|
||||
|
||||
function TLazDbgIdeValueFormatterGeneric.SupportedDisplayFormatCategories: TValueDisplayFormatCategories;
|
||||
begin
|
||||
Result := [vdfCategoryData];
|
||||
end;
|
||||
|
||||
{ TLazDbgIdeValueFormatterRegistryEntryGeneric }
|
||||
|
||||
class function TLazDbgIdeValueFormatterRegistryEntryGeneric.CreateValueFormatter: ILazDbgIdeValueFormatterIntf;
|
||||
|
@ -70,59 +70,5 @@ object IdeProjectValueFormatterOptionsFrame: TIdeProjectValueFormatterOptionsFra
|
||||
Align = alClient
|
||||
ClientHeight = 270
|
||||
ClientWidth = 433
|
||||
inherited Panel1: TPanel
|
||||
Width = 433
|
||||
ClientWidth = 433
|
||||
inherited lstFormatters: TCheckListBox
|
||||
Width = 253
|
||||
end
|
||||
inherited Panel2: TPanel
|
||||
Left = 263
|
||||
end
|
||||
end
|
||||
inherited pnlCurrentFormatter: TPanel
|
||||
Height = 120
|
||||
Width = 433
|
||||
ClientHeight = 120
|
||||
ClientWidth = 433
|
||||
inherited lblDesc: TLabel
|
||||
Width = 423
|
||||
end
|
||||
inherited Panel5: TPanel
|
||||
Height = 100
|
||||
Width = 183
|
||||
ClientHeight = 100
|
||||
ClientWidth = 183
|
||||
inherited lblName: TLabel
|
||||
Width = 173
|
||||
end
|
||||
inherited EdName: TEdit
|
||||
Width = 173
|
||||
end
|
||||
inherited lblTypeNames: TLabel
|
||||
Width = 173
|
||||
end
|
||||
inherited memoTypeNames: TMemo
|
||||
Height = 0
|
||||
Top = 70
|
||||
Width = 173
|
||||
end
|
||||
inherited cbAppendOriginalValue: TComboBox
|
||||
Top = 71
|
||||
Width = 171
|
||||
end
|
||||
end
|
||||
inherited vtvDisplayFormat: TLazVirtualStringTree
|
||||
Left = 183
|
||||
Height = 100
|
||||
end
|
||||
end
|
||||
inherited Splitter1: TSplitter
|
||||
Width = 433
|
||||
end
|
||||
inherited pnlCurFormatterSetting: TPanel
|
||||
Top = 270
|
||||
Width = 433
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -14,59 +14,5 @@ object IdeDbgValFormatOptionsFrame: TIdeDbgValFormatOptionsFrame
|
||||
Align = alClient
|
||||
ClientHeight = 240
|
||||
ClientWidth = 346
|
||||
inherited Panel1: TPanel
|
||||
Width = 346
|
||||
ClientWidth = 346
|
||||
inherited lstFormatters: TCheckListBox
|
||||
Width = 166
|
||||
end
|
||||
inherited Panel2: TPanel
|
||||
Left = 176
|
||||
end
|
||||
end
|
||||
inherited pnlCurrentFormatter: TPanel
|
||||
Height = 120
|
||||
Width = 346
|
||||
ClientHeight = 120
|
||||
ClientWidth = 346
|
||||
inherited lblDesc: TLabel
|
||||
Width = 336
|
||||
end
|
||||
inherited Panel5: TPanel
|
||||
Height = 100
|
||||
Width = 96
|
||||
ClientHeight = 100
|
||||
ClientWidth = 96
|
||||
inherited lblName: TLabel
|
||||
Width = 86
|
||||
end
|
||||
inherited EdName: TEdit
|
||||
Width = 86
|
||||
end
|
||||
inherited lblTypeNames: TLabel
|
||||
Width = 86
|
||||
end
|
||||
inherited memoTypeNames: TMemo
|
||||
Height = 0
|
||||
Top = 70
|
||||
Width = 86
|
||||
end
|
||||
inherited cbAppendOriginalValue: TComboBox
|
||||
Top = 71
|
||||
Width = 84
|
||||
end
|
||||
end
|
||||
inherited vtvDisplayFormat: TLazVirtualStringTree
|
||||
Left = 96
|
||||
Height = 100
|
||||
end
|
||||
end
|
||||
inherited Splitter1: TSplitter
|
||||
Width = 346
|
||||
end
|
||||
inherited pnlCurFormatterSetting: TPanel
|
||||
Top = 240
|
||||
Width = 346
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -125,17 +125,17 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
Left = 0
|
||||
Height = 354
|
||||
Top = 20
|
||||
Width = 388
|
||||
Width = 638
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 354
|
||||
ClientWidth = 388
|
||||
ClientWidth = 638
|
||||
TabOrder = 0
|
||||
object lblName: TLabel
|
||||
Left = 5
|
||||
Height = 15
|
||||
Top = 5
|
||||
Width = 378
|
||||
Width = 628
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 5
|
||||
Caption = 'lblName'
|
||||
@ -144,7 +144,7 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
Left = 5
|
||||
Height = 23
|
||||
Top = 25
|
||||
Width = 378
|
||||
Width = 628
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 5
|
||||
TabOrder = 0
|
||||
@ -154,7 +154,7 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
Left = 5
|
||||
Height = 15
|
||||
Top = 53
|
||||
Width = 378
|
||||
Width = 628
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 5
|
||||
Caption = 'lblTypeNames'
|
||||
@ -163,7 +163,7 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
Left = 5
|
||||
Height = 246
|
||||
Top = 73
|
||||
Width = 378
|
||||
Width = 628
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 5
|
||||
TabOrder = 1
|
||||
@ -172,7 +172,7 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 325
|
||||
Width = 376
|
||||
Width = 626
|
||||
Align = alBottom
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 15
|
||||
@ -180,25 +180,6 @@ object IdeDbgVarFormatterFrame: TIdeDbgVarFormatterFrame
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object vtvDisplayFormat: TLazVirtualStringTree
|
||||
Left = 388
|
||||
Height = 354
|
||||
Top = 20
|
||||
Width = 250
|
||||
Align = alRight
|
||||
DefaultText = '-'
|
||||
DragOperations = []
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.MainColumn = -1
|
||||
NodeDataSize = 4
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale]
|
||||
TreeOptions.MiscOptions = [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toShowDropmark, toThemeAware, toUseBlendedImages, toUseExplorerTheme]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect, toRightClickSelect]
|
||||
OnGetText = vtvDisplayFormatGetText
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crVSplit
|
||||
|
@ -22,7 +22,6 @@ type
|
||||
cbAppendOriginalValue: TComboBox;
|
||||
dropAction: TComboBox;
|
||||
EdName: TEdit;
|
||||
vtvDisplayFormat: TLazVirtualStringTree;
|
||||
lblDesc: TLabel;
|
||||
lblName: TLabel;
|
||||
lblTypeNames: TLabel;
|
||||
@ -41,9 +40,6 @@ type
|
||||
procedure EdNameEditingDone(Sender: TObject);
|
||||
procedure lstFormattersClick(Sender: TObject);
|
||||
procedure lstFormattersItemClick(Sender: TObject; Index: integer);
|
||||
procedure vtvDisplayFormatGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: String);
|
||||
private
|
||||
FValFormmaterList: TIdeDbgValueFormatterSelectorList;
|
||||
FCurIdx: Integer;
|
||||
@ -168,10 +164,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TIdeDbgVarFormatterFrame.lstFormattersClick(Sender: TObject);
|
||||
var
|
||||
vnd: PVirtualNode;
|
||||
ValForm: ILazDbgIdeValueFormatterIntf;
|
||||
dt: PVtvData;
|
||||
begin
|
||||
SaveCurrent;
|
||||
pnlCurrentFormatter.Enabled := lstFormatters.Count > 0;
|
||||
@ -183,7 +175,6 @@ begin
|
||||
lblDesc.Caption := '';
|
||||
EdName.Text := '';
|
||||
memoTypeNames.Text := '';
|
||||
vtvDisplayFormat.Visible := False;
|
||||
end
|
||||
else begin
|
||||
pnlCurrentFormatter.Enabled := True;
|
||||
@ -195,28 +186,6 @@ begin
|
||||
|
||||
cbAppendOriginalValue.ItemIndex := ord(FCurFormatter.OriginalValue);
|
||||
|
||||
if FCurFormatter <> nil then begin
|
||||
ValForm := FCurFormatter.ValFormatter;
|
||||
if (ValForm <> nil) and (ValForm.SupportedDisplayFormatFilters <> []) then begin
|
||||
vtvDisplayFormat.Visible := True;
|
||||
|
||||
for vnd in vtvDisplayFormat.Nodes do begin
|
||||
dt := PVtvData(vtvDisplayFormat.GetNodeData(vnd));
|
||||
if dt^.IsGrp then
|
||||
vtvDisplayFormat.IsVisible[vnd] := dt^.Grp in ValForm.SupportedDisplayFormatFilters
|
||||
else
|
||||
if (dt^.DispForm in FCurFormatter.FilterDisplayFormats) and
|
||||
(ValueDisplayFormatGroupMap[dt^.DispForm] in ValForm.SupportedDisplayFormatFilters)
|
||||
then
|
||||
vtvDisplayFormat.CheckState[vnd] := csCheckedNormal
|
||||
else
|
||||
vtvDisplayFormat.CheckState[vnd] := csUncheckedNormal;
|
||||
end;
|
||||
end
|
||||
else
|
||||
vtvDisplayFormat.Visible := False;
|
||||
end;
|
||||
|
||||
btnRemove.Enabled := FCurIdx >= 0;
|
||||
btnUp.Enabled := FCurIdx >= 1;
|
||||
btnDown.Enabled := FCurIdx < FValFormmaterList.Count - 1;
|
||||
@ -230,7 +199,6 @@ procedure TIdeDbgVarFormatterFrame.lstFormattersItemClick(Sender: TObject;
|
||||
Index: integer);
|
||||
begin
|
||||
if Index < 0 then begin
|
||||
vtvDisplayFormat.Visible := False;
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -245,19 +213,6 @@ begin
|
||||
UpdateButtons;
|
||||
end;
|
||||
|
||||
procedure TIdeDbgVarFormatterFrame.vtvDisplayFormatGetText(
|
||||
Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType; var CellText: String);
|
||||
var
|
||||
dt: PVtvData;
|
||||
begin
|
||||
dt := PVtvData(vtvDisplayFormat.GetNodeData(Node));
|
||||
if dt^.IsGrp then
|
||||
CellText := DisplayFormatGroupName(dt^.Grp)
|
||||
else
|
||||
CellText := DisplayFormatName(dt^.DispForm);
|
||||
end;
|
||||
|
||||
procedure TIdeDbgVarFormatterFrame.SetCurFormatter(
|
||||
AValFormatter: TIdeDbgValueFormatterSelector);
|
||||
begin
|
||||
@ -359,10 +314,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TIdeDbgVarFormatterFrame.SaveCurrent;
|
||||
var
|
||||
df: TValueDisplayFormats;
|
||||
i: Integer;
|
||||
vnd: PVirtualNode;
|
||||
begin
|
||||
if (FCurFormatter = nil) or (FCurFormatter.ValFormatter = nil) then
|
||||
exit;
|
||||
@ -382,23 +333,12 @@ begin
|
||||
if FCurFormatter.OriginalValue <> TLazDbgIdeValFormatterOriginalValue(cbAppendOriginalValue.ItemIndex) then
|
||||
FValFormmaterList.Changed := True;
|
||||
FCurFormatter.OriginalValue := TLazDbgIdeValFormatterOriginalValue(cbAppendOriginalValue.ItemIndex);
|
||||
|
||||
|
||||
df := [];
|
||||
for vnd in vtvDisplayFormat.CheckedNodes do
|
||||
df := df + [PVtvData(vtvDisplayFormat.GetNodeData(vnd))^.DispForm];
|
||||
if FCurFormatter.FilterDisplayFormats <> df then
|
||||
FValFormmaterList.Changed := True;
|
||||
FCurFormatter.FilterDisplayFormats := df;
|
||||
end;
|
||||
|
||||
procedure TIdeDbgVarFormatterFrame.Setup;
|
||||
var
|
||||
AvailClass: TLazDbgIdeValueFormatterRegistry;
|
||||
i: Integer;
|
||||
df: TValueDisplayFormat;
|
||||
CurDfg, dfg: TValueDisplayFormatGroup;
|
||||
VNdGroup, VNdItem: PVirtualNode;
|
||||
begin
|
||||
btnAdd.Caption := dlgBackConvOptAddNew;
|
||||
btnRemove.Caption := dlgBackConvOptRemove;
|
||||
@ -411,30 +351,6 @@ begin
|
||||
cbAppendOriginalValue.AddItem(ValFormatterOrigValAtEnd, nil); // vfovAtEnd
|
||||
cbAppendOriginalValue.AddItem(ValFormatterOrigValAtStart, nil); // vfovAtFront;
|
||||
|
||||
vtvDisplayFormat.Clear;
|
||||
vtvDisplayFormat.NodeDataSize := SizeOf(TVtvData);
|
||||
VNdGroup := nil;
|
||||
CurDfg := low(TValueDisplayFormatGroup);
|
||||
for df in TValueDisplayFormat do begin
|
||||
dfg := ValueDisplayFormatGroupMap[df];
|
||||
if (VNdGroup = nil) or (CurDfg <> dfg) then begin
|
||||
VNdGroup := vtvDisplayFormat.AddChild(nil);
|
||||
with PVtvData(vtvDisplayFormat.GetNodeData(VNdGroup))^ do begin
|
||||
IsGrp := True;
|
||||
Grp := dfg;
|
||||
end;
|
||||
CurDfg := dfg;
|
||||
end;
|
||||
VNdItem := vtvDisplayFormat.AddChild(VNdGroup);
|
||||
vtvDisplayFormat.CheckType[VNdItem] := ctCheckBox;
|
||||
with PVtvData(vtvDisplayFormat.GetNodeData(VNdItem))^ do begin
|
||||
IsGrp := False;
|
||||
DispForm := df;
|
||||
end;
|
||||
|
||||
vtvDisplayFormat.Expanded[VNdGroup] := True;
|
||||
end;
|
||||
|
||||
FCurFormatter := nil;
|
||||
lblDesc.Caption := '';
|
||||
|
||||
|
@ -25,7 +25,6 @@ type
|
||||
private
|
||||
FOriginalValue: TLazDbgIdeValFormatterOriginalValue;
|
||||
FValFormatter: ILazDbgIdeValueFormatterIntf;
|
||||
FFilterDisplayFormats: TValueDisplayFormats;
|
||||
FMatchTypeNames: TDbgTypePatternList;
|
||||
FEnabled: Boolean;
|
||||
FName: String;
|
||||
@ -34,7 +33,6 @@ type
|
||||
procedure FreeValFormater;
|
||||
function GetMatchInherited: boolean;
|
||||
function GetMatchTypeNames: TStrings;
|
||||
procedure SetFilterDisplayFormats(AValue: TValueDisplayFormats);
|
||||
public
|
||||
constructor Create;
|
||||
constructor Create(AFormatter: TLazDbgIdeValueFormatterRegistryEntryClass);
|
||||
@ -52,7 +50,6 @@ type
|
||||
|
||||
function IsMatchingTypeName(ATypeName: String): boolean;
|
||||
function IsMatchingInheritedTypeName(ATypeName: String): boolean;
|
||||
property FilterDisplayFormats: TValueDisplayFormats read FFilterDisplayFormats write SetFilterDisplayFormats;
|
||||
published
|
||||
property ValFormatter: ILazDbgIdeValueFormatterIntf read FValFormatter;
|
||||
property ValFormatterRegEntry: TLazDbgIdeValueFormatterRegistryEntryClass read FValFormatterRegEntry;
|
||||
@ -125,19 +122,10 @@ begin
|
||||
Result := FMatchTypeNames;
|
||||
end;
|
||||
|
||||
procedure TIdeDbgValueFormatterSelector.SetFilterDisplayFormats( AValue: TValueDisplayFormats);
|
||||
begin
|
||||
if FFilterDisplayFormats = AValue then Exit;
|
||||
if FValFormatter <> nil then
|
||||
AValue := AValue * DisplayFormatMask(FValFormatter.SupportedDisplayFormatFilters);
|
||||
FFilterDisplayFormats := AValue;
|
||||
end;
|
||||
|
||||
constructor TIdeDbgValueFormatterSelector.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FMatchTypeNames := TDbgTypePatternList.Create;
|
||||
FFilterDisplayFormats := [low(TValueDisplayFormats)..high(TValueDisplayFormats)] - [vdfCategoryMemDump];
|
||||
end;
|
||||
|
||||
constructor TIdeDbgValueFormatterSelector.Create(
|
||||
@ -148,7 +136,6 @@ begin
|
||||
FValFormatterRegEntry := AFormatter;
|
||||
if FValFormatterRegEntry <> nil then begin
|
||||
FValFormatter := FValFormatterRegEntry.CreateValueFormatter;
|
||||
FFilterDisplayFormats := FFilterDisplayFormats * DisplayFormatMask(FValFormatter.SupportedDisplayFormatFilters);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -174,7 +161,6 @@ begin
|
||||
FName := ASource.FName;
|
||||
FEnabled := ASource.FEnabled;
|
||||
FOriginalValue := ASource.FOriginalValue;
|
||||
FFilterDisplayFormats := ASource.FFilterDisplayFormats;
|
||||
end;
|
||||
|
||||
procedure TIdeDbgValueFormatterSelector.LoadDataFromXMLConfig(
|
||||
@ -182,7 +168,6 @@ procedure TIdeDbgValueFormatterSelector.LoadDataFromXMLConfig(
|
||||
var
|
||||
s: String;
|
||||
Def: TObject;
|
||||
df: TValueDisplayFormats;
|
||||
begin
|
||||
FreeValFormater;
|
||||
AConfig.ReadObject(APath + 'Filter/', Self);
|
||||
@ -195,9 +180,6 @@ begin
|
||||
|
||||
FValFormatter := FValFormatterRegEntry.CreateValueFormatter;
|
||||
|
||||
df := [];
|
||||
AConfig.GetValue(APath + 'FilterDisplayFormats', df, FFilterDisplayFormats, TypeInfo(TValueDisplayFormats));
|
||||
|
||||
Def := FValFormatter.GetDefaultsObject;
|
||||
AConfig.ReadObject(APath + 'Formatter/', FValFormatter.GetObject, Def);
|
||||
Def.Free;
|
||||
@ -212,7 +194,6 @@ begin
|
||||
AConfig.SetDeleteValue(APath + 'Filter/MatchTypeNames', MatchTypeNames.CommaText, '');
|
||||
|
||||
AConfig.SetValue(APath + 'FormatterClass', FValFormatterRegEntry.GetClassName);
|
||||
AConfig.SetValue(APath + 'FilterDisplayFormats', FFilterDisplayFormats, TypeInfo(TValueDisplayFormats));
|
||||
|
||||
Def := FValFormatter.GetDefaultsObject;
|
||||
AConfig.WriteObject(APath + 'Formatter/', FValFormatter.GetObject, Def);
|
||||
@ -227,28 +208,9 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
if (ValFormatter = nil) or
|
||||
(not (vffFormatValue in ValFormatter.SupportedFeatures))
|
||||
or
|
||||
( ADisplayFormat.MemDump and (
|
||||
( not(vffValueMemDump in ValFormatter.SupportedFeatures) ) or
|
||||
( (vdfgCategory in ValFormatter.SupportedDisplayFormatFilters) and (not (vdfCategoryMemDump in FFilterDisplayFormats)) )
|
||||
) )
|
||||
or
|
||||
( (not ADisplayFormat.MemDump) and (
|
||||
( not(vffValueData in ValFormatter.SupportedFeatures) ) or
|
||||
( (vdfgCategory in ValFormatter.SupportedDisplayFormatFilters) and (not (vdfCategoryData in FFilterDisplayFormats)) ) or
|
||||
// TOOD: 2nd num
|
||||
( (vdfgBase in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Num.BaseFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgSign in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Num.SignFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgEnum in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Enum.MainFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgBool in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Bool.MainFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgChar in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Char.MainFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgFloat in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Float.NumFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgStruct in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Struct.DataFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgStructAddress in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Struct.ShowPointerFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgAddress in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Pointer.Address.TypeFormat in FFilterDisplayFormats)) ) or
|
||||
( (vdfgPointerDeref in ValFormatter.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Pointer.DerefFormat in FFilterDisplayFormats)) )
|
||||
) )
|
||||
(not (vffFormatValue in ValFormatter.SupportedFeatures)) or
|
||||
( ADisplayFormat.MemDump and (not(vffValueMemDump in ValFormatter.SupportedFeatures)) ) or
|
||||
( (not ADisplayFormat.MemDump) and (not(vffValueData in ValFormatter.SupportedFeatures)) )
|
||||
then
|
||||
exit;
|
||||
//AWatchValue.ValueKind;
|
||||
@ -428,29 +390,11 @@ begin
|
||||
for i := 0 to Count - 1 do begin
|
||||
f := Items[i];
|
||||
v := f.ValFormatter;
|
||||
if (not (vffFormatOldValue in v.SupportedFeatures))
|
||||
or (v = nil)
|
||||
or
|
||||
( ADisplayFormat.MemDump and (
|
||||
( not(vffValueMemDump in v.SupportedFeatures) ) or
|
||||
( (vdfgCategory in v.SupportedDisplayFormatFilters) and (not (vdfCategoryMemDump in f.FFilterDisplayFormats)) )
|
||||
) )
|
||||
or
|
||||
( (not ADisplayFormat.MemDump) and (
|
||||
( not(vffValueData in v.SupportedFeatures) ) or
|
||||
( (vdfgCategory in v.SupportedDisplayFormatFilters) and (not (vdfCategoryData in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgBase in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Num.BaseFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgSign in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Num.SignFormat in f.FFilterDisplayFormats)) ) or
|
||||
// TODO 2nd num
|
||||
( (vdfgEnum in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Enum.MainFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgBool in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Bool.MainFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgChar in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Char.MainFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgFloat in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Float.NumFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgStruct in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Struct.DataFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgStructAddress in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Struct.ShowPointerFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgAddress in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Pointer.Address.TypeFormat in f.FFilterDisplayFormats)) ) or
|
||||
( (vdfgPointerDeref in v.SupportedDisplayFormatFilters) and (not (ADisplayFormat.Pointer.DerefFormat in f.FFilterDisplayFormats)) )
|
||||
) )
|
||||
|
||||
if (v = nil) or
|
||||
(not (vffFormatOldValue in v.SupportedFeatures)) or
|
||||
( ADisplayFormat.MemDump and (not(vffValueMemDump in v.SupportedFeatures)) ) or
|
||||
( (not ADisplayFormat.MemDump) and (not(vffValueData in v.SupportedFeatures)) )
|
||||
then
|
||||
continue;
|
||||
|
||||
|
@ -46,7 +46,6 @@ type
|
||||
procedure Assign(AnOther: TObject); override;
|
||||
public
|
||||
function SupportedFeatures: TLazDbgIdeValFormatterFeatures; override;
|
||||
function SupportedDisplayFormatFilters: TValueDisplayFormatGroups; override;
|
||||
published
|
||||
property ShowName: Boolean read FShowName write FShowName;
|
||||
property ShowRgb: Boolean read FShowRgb write FShowRgb;
|
||||
@ -179,11 +178,6 @@ begin
|
||||
Result := [vffFormatValue, vffFormatOldValue, vffValueData];
|
||||
end;
|
||||
|
||||
function TIdeDbgValueFormatterColorBase.SupportedDisplayFormatFilters: TValueDisplayFormatGroups;
|
||||
begin
|
||||
Result := [vdfgBase, vdfgSign];
|
||||
end;
|
||||
|
||||
class function TIdeDbgValueFormatterColor.GetRegisteredDisplayName: String;
|
||||
begin
|
||||
Result := ValFormatterColorName;
|
||||
|
@ -33,7 +33,6 @@ type
|
||||
): boolean; override; deprecated 'For values from older backends only - to be removed as backends are upgraded';
|
||||
|
||||
function SupportedFeatures: TLazDbgIdeValFormatterFeatures; override;
|
||||
function SupportedDisplayFormatFilters: TValueDisplayFormatGroups; override;
|
||||
end;
|
||||
TIdeDbgValueFormatterRegistryCurrency =
|
||||
specialize TLazDbgIdeValueFormatterRegistryEntryGeneric<TIdeDbgValueFormatterCurrency>;
|
||||
@ -102,11 +101,6 @@ begin
|
||||
Result := [vffFormatValue, vffFormatOldValue, vffValueData];
|
||||
end;
|
||||
|
||||
function TIdeDbgValueFormatterCurrency.SupportedDisplayFormatFilters: TValueDisplayFormatGroups;
|
||||
begin
|
||||
Result := [vdfgBase, vdfgSign];
|
||||
end;
|
||||
|
||||
initialization
|
||||
ValueFormatterRegistry.Add(TIdeDbgValueFormatterRegistryCurrency);
|
||||
|
||||
|
@ -57,7 +57,6 @@ type
|
||||
): boolean; override; deprecated 'For values from older backends only - to be removed as backends are upgraded';
|
||||
|
||||
function SupportedFeatures: TLazDbgIdeValFormatterFeatures; override;
|
||||
function SupportedDisplayFormatFilters: TValueDisplayFormatGroups; override;
|
||||
published
|
||||
property DateTimeFormat: String read FDateTimeFormat write FDateTimeFormat;
|
||||
property DateFormat: String read FDateFormat write FDateFormat;
|
||||
@ -196,11 +195,6 @@ begin
|
||||
Result := [vffFormatValue, vffFormatOldValue, vffValueData];
|
||||
end;
|
||||
|
||||
function TIdeDbgValueFormatterDateTime.SupportedDisplayFormatFilters: TValueDisplayFormatGroups;
|
||||
begin
|
||||
Result := [];
|
||||
end;
|
||||
|
||||
initialization
|
||||
ValueFormatterRegistry.Add(TIdeDbgValueFormatterRegistryDateTime);
|
||||
|
||||
|
@ -68,7 +68,6 @@ begin
|
||||
f := TIdeDbgValueFormatterSelector.Create(TIdeDbgValueFormatterRegistryCurrency);
|
||||
f.Name := 'Currency formatter';
|
||||
f.Enabled := True;
|
||||
f.FilterDisplayFormats := [low(TValueDisplayFormat)..high(TValueDisplayFormat)] - [vdfCategoryMemDump, vdfBaseDecimal..vdfBaseChar];
|
||||
f.MatchTypeNames.Add('Currency');
|
||||
f.OriginalValue := vfovHide;
|
||||
vc.Add(f);
|
||||
|
Loading…
Reference in New Issue
Block a user