diff --git a/.gitignore b/.gitignore index f310024..a7dd60a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ Units/__history/ bin/ lib/ __history/ + +*.stat diff --git a/Forms/MainFrm.pas b/Forms/MainFrm.pas index d254936..b902384 100644 --- a/Forms/MainFrm.pas +++ b/Forms/MainFrm.pas @@ -459,6 +459,7 @@ var propertyItem: TXMLDataBindingSimpleProperty; newMembers: TList; 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); diff --git a/Units/XMLDataBindingGenerator.pas b/Units/XMLDataBindingGenerator.pas index a3a17f6..62f2b87 100644 --- a/Units/XMLDataBindingGenerator.pas +++ b/Units/XMLDataBindingGenerator.pas @@ -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; diff --git a/X2XMLDataBinding.stat b/X2XMLDataBinding.stat deleted file mode 100644 index a376760..0000000 --- a/X2XMLDataBinding.stat +++ /dev/null @@ -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