Fixed: no enum type was generated for replaced enumerations
This commit is contained in:
parent
3d5c2943fc
commit
f6b4267a5e
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ Units/__history/
|
||||
bin/
|
||||
lib/
|
||||
__history/
|
||||
|
||||
*.stat
|
||||
|
@ -459,6 +459,7 @@ var
|
||||
propertyItem: TXMLDataBindingSimpleProperty;
|
||||
newMembers: TList<TXMLDataBindingEnumerationMember>;
|
||||
newPropertyItem: TXMLDataBindingItemProperty;
|
||||
targetSchema: TXMLDataBindingSchema;
|
||||
|
||||
begin
|
||||
for itemIndex := 0 to Pred(Hints.Enumerations.Count) do
|
||||
@ -491,6 +492,10 @@ begin
|
||||
if propertyItem.DataType.Name = 'string' then
|
||||
begin
|
||||
enumerationItem := TXMLDataBindingEnumeration.Create(Self, schemaItem.SchemaItem, nil, schemaItem.Name);
|
||||
|
||||
if FindSchema(enumeration.Schema, targetSchema) then
|
||||
targetSchema.AddItem(enumerationItem);
|
||||
|
||||
newPropertyItem := TXMLDataBindingItemProperty.Create(Self, propertyItem.SchemaItem, propertyItem.Name, enumerationItem);
|
||||
|
||||
newMembers := GetNewMembers(enumerationItem, enumeration);
|
||||
|
@ -139,7 +139,6 @@ type
|
||||
procedure ReplaceItem(const AOldItem, ANewItem: TXMLDataBindingItem; ARemoveOnly: Boolean); override;
|
||||
|
||||
procedure AddInclude(ASchema: TXMLDataBindingSchema);
|
||||
procedure AddItem(AItem: TXMLDataBindingItem);
|
||||
procedure InsertItem(AItem, AAfter: TXMLDataBindingItem);
|
||||
|
||||
property ItemsGenerated: Boolean read FItemsGenerated write FItemsGenerated;
|
||||
@ -147,6 +146,8 @@ type
|
||||
constructor Create(AOwner: TXMLDataBindingGenerator);
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure AddItem(AItem: TXMLDataBindingItem);
|
||||
|
||||
property TargetNamespace: String read GetTargetNamespace;
|
||||
|
||||
property IncludeCount: Integer read GetIncludeCount;
|
||||
|
@ -1,10 +0,0 @@
|
||||
[Stats]
|
||||
EditorSecs=92
|
||||
DesignerSecs=13
|
||||
InspectorSecs=1
|
||||
CompileSecs=1741
|
||||
OtherSecs=40
|
||||
StartTime=09/04/2020 10:52:32
|
||||
RealKeys=0
|
||||
EffectiveKeys=0
|
||||
DebugSecs=71
|
Loading…
Reference in New Issue
Block a user