private void UpdateLabels() { if (PSMClass.IsStructuralRepresentative) { txtRepresentedClassName.ToolTip = "Represented PSM class name"; if (RepresentedPSMClassNameLabelText != ElementName || PSMClass.IsStructuralRepresentativeExternal) { txtRepresentedClassName.Visibility = Visibility.Visible; if (!PSMClass.IsStructuralRepresentativeExternal) { txtRepresentedClassName.Text = RepresentedPSMClassNameLabelText; } else { txtRepresentedClassName.Text = PSMClass.GetStructuralRepresentativeExternalDiagramReference().NamespacePrefix + ":" + RepresentedPSMClassNameLabelText; } } else { txtRepresentedClassName.Visibility = Visibility.Collapsed; txtRepresentedClassName.Text = string.Empty; } } else { txtRepresentedClassName.ToolTip = "Represented PIM class name"; if (PIMClassNameLabelText != ElementName) { txtRepresentedClassName.Visibility = Visibility.Visible; txtRepresentedClassName.Text = PIMClassNameLabelText; } else { txtRepresentedClassName.Visibility = Visibility.Collapsed; txtRepresentedClassName.Text = string.Empty; } } }