private void RefreshTextContent() { string text = string.Empty; if (PIMAttribute.AttributeType != null) { text = string.Format("{0} : {1}", PIMAttribute.Name, PIMAttribute.AttributeType.Name); } else { text = PIMAttribute.Name; } if (!String.IsNullOrEmpty(PIMAttribute.GetCardinalityString()) && PIMAttribute.GetCardinalityString() != "1") { text += String.Format(" {{{0}}}", PIMAttribute.GetCardinalityString()); } if (PIMAttribute.DefaultValue != null) { text += string.Format(" [init: {0}]", PIMAttribute.DefaultValue); } if (PIMAttribute.AppliedStereotypes.Count > 0) { text = PIMAttribute.AppliedStereotypes.GetStereotypesString() + Environment.NewLine + text; } this.Text = text; }
private void CopyValues(PIMAttribute a) { Name = a.Name; Type = a.AttributeType; Multiplicity = a.GetCardinalityString(); DefaultValue = a.DefaultValue; }
public FakePSMAttribute(PIMAttribute p) : this() { Name = p.Name; Type = p.AttributeType; Multiplicity = p.GetCardinalityString(); DefaultValue = p.DefaultValue; SourceAttribute = null; RepresentedAttribute = p; ComesFrom = (PIMClass)p.PIMClass; Checked = false; XFormElement = false; }
public FakePSMAttribute(PIMAttribute p, TypeFinder typeFinder) : this() { Name = p.Name; Multiplicity = p.GetCardinalityString(); DefaultValue = p.DefaultValue; SourceAttribute = null; RepresentedAttribute = p; ComesFrom = (PIMClass)p.PIMClass; Checked = false; XFormElement = true; if (p.AttributeType != null) { Type = typeFinder(p.AttributeType); } }