Commit f6b4267a authored by Mark van Renswoude's avatar Mark van Renswoude

Fixed: no enum type was generated for replaced enumerations

parent 3d5c2943
......@@ -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;
......
[Stats]
EditorSecs=92
DesignerSecs=13
InspectorSecs=1
CompileSecs=1741
OtherSecs=40
StartTime=09/04/2020 10:52:32
RealKeys=0
EffectiveKeys=0
DebugSecs=71
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment