1
0
mirror of synced 2024-11-14 02:59:16 +00:00

Fixed: no enum type was generated for replaced enumerations

This commit is contained in:
Mark van Renswoude 2020-04-22 12:34:21 +02:00
parent 3d5c2943fc
commit f6b4267a5e
4 changed files with 9 additions and 11 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ Units/__history/
bin/
lib/
__history/
*.stat

View File

@ -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);

View File

@ -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;

View File

@ -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