///<summary> /// Emit [DependsOnDomainModel] attributes for each model this library uses. ///</summary> private void GenerateExtendsAttributesInternal(MetaModel library) { foreach (string extendedModel in GetRequiredModelsList(library)) { if (string.CompareOrdinal(library.GetFullName(true) + "DomainModel", extendedModel) != 0) { #line default #line hidden #line 256 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("[DslModeling::DependsOnDomainModel(typeof("); #line default #line hidden #line 257 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(extendedModel)); #line default #line hidden #line 257 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("))]\r\n"); #line default #line hidden #line 258 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" } } }
public void GenerateUI(MetaModel dm) { #line default #line hidden #line 15 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(@"using DslEditorContracts = Tum.PDE.ToolFramework.Modeling.Visualization.Contracts; using DslEditorPopups = Tum.PDE.ToolFramework.Modeling.Visualization.Controls.Popups; using DslEditorServices = Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel.Services; using DslEditorCommands = Tum.PDE.ToolFramework.Modeling.Visualization.Commands; using DslEditorDiagramSurface = Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel.DiagramSurface; using WPFRibbon = Fluent; using System; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Reflection; using System.Windows.Controls; using "); #line default #line hidden #line 30 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.Namespace)); #line default #line hidden #line 30 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(".ViewModel;\r\n\r\nnamespace "); #line default #line hidden #line 32 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.Namespace)); #line default #line hidden #line 32 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(".View\r\n{\r\n\t/// <summary>\r\n /// This class is used as a base class for the main" + " window of the editor.\r\n /// </summary>\r\n\tpublic abstract class DslPluginMain" + "Control : UserControl\r\n\t{\r\n\t\t/// <summary>\r\n /// "); #line default #line hidden #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name)); #line default #line hidden #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(" Modeling document data.\r\n /// </summary>\r\n protected "); #line default #line hidden #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.GetFullName(true))); #line default #line hidden #line 42 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write("DocumentData DocData = null;\r\n\t\t\r\n /// <summary>\r\n /// "); #line default #line hidden #line 45 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name)); #line default #line hidden #line 45 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(" Main view model.\r\n /// </summary>\r\n protected "); #line default #line hidden #line 47 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name)); #line default #line hidden #line 47 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(@"MainViewModel ViewModel = null; /* /// <summary> /// Imported plugins which suffice to the IPlugin interface. /// </summary> [ImportMany(typeof(DslEditorContracts::IPlugin))] public System.Collections.Generic.List<DslEditorContracts::IPlugin> SimplePlugins { get; set; } /// <summary> /// Imported plugins which suffice to the IPlugin interface. /// </summary> [ImportMany(typeof(DslEditorContracts::IModelPlugin))] public System.Collections.Generic.List<DslEditorContracts::IModelPlugin> SimpleModelPlugins { get; set; } /// <summary> /// Imported plugins which suffice to the IViewModelPlugin interface. /// </summary> [ImportMany(typeof(DslEditorContracts::IViewModelPlugin))] public System.Collections.Generic.List<DslEditorContracts::IViewModelPlugin> ViewModelPlugins { get; set; } */ /// <summary> /// Plugins directory. /// </summary> public const string PluginsDirectory = ""plugins""; /// <summary> /// Constructor. /// </summary> public DslPluginMainControl() { } /// <summary> /// Sets view model. /// </summary> /// <param name=""viewModel"">VM.</param> public virtual void SetViewModel(" ); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Namespace)); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(".ViewModel."); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name)); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" this.Write("MainViewModel viewModel)\r\n\t\t{\r\n\t\t\ttry\r\n { \r\n\t\t\t\tthis.ViewMod" + "el = viewModel;\r\n this.DataContext = viewModel;\r\n\r\n \tv" + "iewModel.Ribbon = this.Ribbon;\r\n\t\t\t\tviewModel.RestoreLayout();\r\n\t\t\t}\r\n\t\t\tcatch (" + "System.Exception ex)\r\n {\r\n\t\t\t\tSystem.Windows.MessageBox.Show(\"Error d" + "uring initialization: \" + ex.Message);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Register known windows\r" + "\n\t\t\tDslEditorServices::IUIVisualizerService popupVisualizer = ViewModel.GlobalSe" + "rviceProvider.Resolve<DslEditorServices::IUIVisualizerService>();\t\t\t\t\r\n\t\t\tpopupV" + "isualizer.TryRegister(\"SelectElementPopup\", typeof(DslEditorPopups::SelectElemen" + "tPopup));\r\n\t\t\tpopupVisualizer.TryRegister(\"DeleteElementsPopup\", typeof(DslEdito" + "rPopups::DeleteElementsPopup));\t\t\t\t\r\n\t\t\tpopupVisualizer.TryRegister(\"SelectEleme" + "ntWithRSTypePopup\", typeof(DslEditorPopups::SelectElementWithRSTypePopup));\r\n\t\t\t" + "popupVisualizer.TryRegister(\"SelectRSTypePopup\", typeof(DslEditorPopups::SelectR" + "STypePopup));\r\n\t\t\t\t\r\n\t\t\t/*\r\n try\r\n {\r\n // l" + "oad plugins\r\n LoadPlugins();\r\n }\r\n catch (S" + "ystem.Exception ex)\r\n {\r\n System.Windows.MessageBox.Sh" + "ow(\"Error during plugin loading: \" + ex.Message);\r\n }*/\r\n\t\t}\r\n\t\t\r\n\t\t/" + "*\r\n\t\t/// <summary>\r\n /// Load plugins.\r\n /// </summary>\r\n\t\tpublic " + "virtual void LoadPlugins()\r\n\t\t{\r\n\t\t\ttry\r\n {\r\n\t\t\t\tstring path = Assemb" + "ly.GetAssembly(this.GetType()).Location;\r\n string dir = new Syste" + "m.IO.FileInfo(path).Directory.FullName;\r\n\r\n string fullDir = dir " + "+ System.IO.Path.DirectorySeparatorChar + PluginsDirectory;\r\n\r\n\r\n\t\t\t\t// Load plu" + "gins\r\n if (!System.IO.Directory.Exists(fullDir))\r\n " + " System.IO.Directory.CreateDirectory(fullDir);\r\n\r\n DirectoryC" + "atalog directoryCatalog = new DirectoryCatalog(fullDir);\r\n\t\t\t\tCompositionContain" + "er container = new CompositionContainer(directoryCatalog);\r\n \tcontain" + "er.ComposeParts(this);\r\n\t\t\t\t\r\n\t\t\t\tif( SimplePlugins.Count > 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor" + "each(DslEditorContracts::IPlugin plugin in SimplePlugins)\r\n\t\t\t\t\t\tforeach (Tum.PD" + "E.ToolFramework.Modeling.Visualization.ViewModel.ModelContextViewModel mcVM in V" + "iewModel.AvailableModelModelContextViewModels)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif( plugin.Model" + "Context == mcVM.ModelContext.Name || plugin.ModelContext == null)\r\n\t\t\t\t\t\t\t\tmcVM." + "AddPlugin(plugin);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif( SimpleModelPlugins.Count >" + " 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach(DslEditorContracts::IModelPlugin plugin in SimpleModel" + "Plugins)\r\n\t\t\t\t\t\tforeach (Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel." + "ModelContextViewModel mcVM in ViewModel.AvailableModelModelContextViewModels)\r\n\t" + "\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif( plugin.ModelContext == mcVM.ModelContext.Name || plugin.Model" + "Context == null)\r\n\t\t\t\t\t\t\t\tmcVM.AddPlugin(plugin);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tplugin.SetVi" + "ewModelStore(ViewModel.ViewModelStore);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif( ViewM" + "odelPlugins.Count > 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach(DslEditorContracts::IViewModelPlugi" + "n plugin in ViewModelPlugins)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tDslEditorDiagr" + "amSurface::BaseDiagramSurfaceViewModel vm = plugin.GetViewModel(ViewModel.ViewMo" + "delStore);\r\n\t\t\t\t\t\t\tif( vm != null )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tforeach (Tum.PDE.ToolFram" + "ework.Modeling.Visualization.ViewModel.ModelContextViewModel mcVM in ViewModel.A" + "vailableModelModelContextViewModels)\r\n if (pl" + "ugin.ModelContext == null)\r\n mcVM.AddPlug" + "inViewModel(vm);\r\n else if( plugin.ModelConte" + "xt == mcVM.ModelContext.Name)\r\n mcVM.AddP" + "luginViewModel(vm);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.Windows.ResourceDictionary diction" + "ary = plugin.GetViewModelRessourceDictionary();\r\n\t\t\t\t\t\t\t\tif( dictionary != null " + ")\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tSystem.Windows.Application.Current.Resources.BeginInit();" + "\r\n\t\t\t\t\t\t System.Windows.Application.Current.Resources.MergedDictionar" + "ies.Add(dictionary);\r\n \t\t\t\t\t\tSystem.Windows.Application.Current.Resou" + "rces.EndInit();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch (System.Exception ex)" + "\r\n \t\t\t{\r\n \t\t\tSystem.Windows.MessageBox.Show(ex.Message" + ");\r\n \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n catch (System.Ex" + "ception ex)\r\n {\r\n System.Windows.MessageBox.Show(ex.Me" + "ssage);\r\n }\r\n\t\t}\r\n\t\t*/\r\n\r\n\t\t/// <summary>\r\n /// Gets the WPF r" + "ibbon instance.\r\n /// </summary>\r\n\t\tpublic abstract WPFRibbon::Ribbon Rib" + "bon{ get; }\r\n\t\t\r\n /// <summary>\r\n /// Clean up.\r\n /// </sum" + "mary>\r\n public virtual void Dispose()\r\n {\r\n\t\t\tthis.DataContext = n" + "ull;\r\n\t\t\r\n if (this.ViewModel != null)\r\n {\r\n " + " // Unregister known windows\r\n\t\t\t\t/*\r\n DslEditorServices::IUIVis" + "ualizerService popupVisualizer = ViewModel.GlobalServiceProvider.Resolve<DslEdit" + "orServices::IUIVisualizerService>();\r\n popupVisualizer.Unregister" + "(\"SelectElementPopup\");\r\n popupVisualizer.Unregister(\"DeleteEleme" + "ntsPopup\");\r\n popupVisualizer.Unregister(\"SelectElementWithRSType" + "Popup\");\r\n popupVisualizer.Unregister(\"SelectRSTypePopup\");*/\r\n\r\n" + " this.ViewModel.Dispose();\r\n }\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"); #line default #line hidden #line 229 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Shell\ViewModel\WPFApplication\UIGenerator.tt" }
private void GenerateResourceAttributesInternal(ModelElement domainObj, string genResourceName) { if (domainObj == null) { return; } string resourceKey = ""; string domainModelType = ""; string className = ""; bool generateCategory = false; bool generateDisplayName = false; MetaModel dm = null; if (domainObj is DomainClass) { generateDisplayName = true; DomainClass c = (DomainClass)domainObj; resourceKey = c.GetFullName(false); dm = c.GetMetaModel(); className = CodeGenerationUtilities.GetGenerationClassName(c); } else if (domainObj is DomainRelationship) { generateDisplayName = true; DomainRelationship c = (DomainRelationship)domainObj; resourceKey = c.GetFullName(false); dm = c.GetMetaModel(); className = CodeGenerationUtilities.GetGenerationClassName(c); } else if (domainObj is DomainProperty) { generateDisplayName = true; DomainProperty p = (DomainProperty)domainObj; AttributedDomainElement c = p.Element; resourceKey = c.GetFullName(false) + "/" + p.Name; generateCategory = !String.IsNullOrEmpty(p.Category); dm = c.GetMetaModel(); //if( c is DomainClass ) // dm = (c as DomainClass).GetMetaModel(); //else // dm = (c as DomainRelationship).GetMetaModel(); } else if (domainObj is DomainRole) { generateDisplayName = true; DomainRole r = (DomainRole)domainObj; generateCategory = !String.IsNullOrEmpty(r.Category); DomainRelationship rel = r.Relationship; resourceKey = rel.GetFullName(false) + "/" + r.Name; dm = rel.GetMetaModel(); } else if (domainObj is EnumerationLiteral) { //generateDisplayName = true; EnumerationLiteral literal = (EnumerationLiteral)domainObj; DomainEnumeration domainEnum = literal.DomainEnumeration; dm = domainEnum.MetaModel; resourceKey = domainEnum.GetFullName(false) + "/" + literal.Name; } else if (domainObj is MetaModel) { generateDisplayName = true; dm = (MetaModel)domainObj; resourceKey = dm.GetFullName(false) + "DomainModel"; } domainModelType = dm.GetFullName(true) + "DomainModel"; // If no resource name specified for DslLibrary, don't generate any resource attributes. if (String.IsNullOrEmpty(dm.GeneratedResourceName)) { return; } if (generateDisplayName) { #line default #line hidden #line 179 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("[DslDesign::DisplayNameResource(\""); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey)); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(".DisplayName\", typeof("); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType)); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("), \""); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(genResourceName)); #line default #line hidden #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("\")]\r\n"); #line default #line hidden #line 181 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" } if (generateCategory) { #line default #line hidden #line 185 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("[DslDesign::CategoryResource(\""); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey)); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(".Category\", typeof("); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType)); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("), \""); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(genResourceName)); #line default #line hidden #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("\")]\r\n"); #line default #line hidden #line 187 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" } #line default #line hidden #line 189 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("[DslDesign::DescriptionResource(\""); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey)); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(".Description\", typeof("); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType)); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("), \""); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(genResourceName)); #line default #line hidden #line 190 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("\")]\r\n"); #line default #line hidden #line 191 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" if (domainObj is DomainClass) { #line default #line hidden #line 194 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("[DslModeling::DomainModelOwner(typeof("); #line default #line hidden #line 195 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainModelType)); #line default #line hidden #line 195 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" this.Write("))]\r\n"); #line default #line hidden #line 196 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\Utilities.tt" } }
// Generate an enum for each DomainEnumeration in the model private void GenerateDomainEnumerationInternal(MetaModel dm, DomainEnumeration domainEnum) { if (!string.IsNullOrEmpty(domainEnum.Namespace)) { #line default #line hidden #line 16 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("namespace "); #line default #line hidden #line 17 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Namespace)); #line default #line hidden #line 17 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\r\n{\r\n"); #line default #line hidden #line 19 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" PushIndent("\t"); } #line default #line hidden #line 22 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("/// <summary>\r\n/// DomainEnumeration: "); #line default #line hidden #line 24 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 24 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\r\n"); #line default #line hidden #line 25 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(Utilities.Instance.GenerateComments(domainEnum.Description)); #line default #line hidden #line 27 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("/// </summary>\r\n[System.ComponentModel.TypeConverter(typeof("); #line default #line hidden #line 29 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 29 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("EnumConverter))]\r\n"); #line default #line hidden #line 30 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" if (domainEnum.IsFlags) { #line default #line hidden #line 33 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("[global::System.Flags]\r\n"); #line default #line hidden #line 35 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" } #line default #line hidden #line 38 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(domainEnum.AccessModifier))); #line default #line hidden #line 38 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(" enum "); #line default #line hidden #line 38 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 38 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\r\n{\r\n"); #line default #line hidden #line 40 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" double startVal = 1; foreach (EnumerationLiteral literal in domainEnum.Literals) { #line default #line hidden #line 44 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t/// <summary>\r\n\t/// "); #line default #line hidden #line 46 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Name)); #line default #line hidden #line 46 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\r\n"); #line default #line hidden #line 47 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" PushIndent("\t"); this.Write(Utilities.Instance.GenerateComments(literal.Description)); PopIndent(); #line default #line hidden #line 51 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t/// </summary>\r\n"); #line default #line hidden #line 53 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" PushIndent("\t"); this.Write(Utilities.Instance.GenerateResourceAttributes(literal)); PopIndent(); if (literal.Value.Trim() != string.Empty) { #line default #line hidden #line 60 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t"); #line default #line hidden #line 61 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Name)); #line default #line hidden #line 61 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(" = "); #line default #line hidden #line 61 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Value)); #line default #line hidden #line 61 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(",\r\n"); #line default #line hidden #line 62 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" } else { if (domainEnum.IsFlags) { #line default #line hidden #line 68 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t"); #line default #line hidden #line 69 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Name)); #line default #line hidden #line 69 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(" = "); #line default #line hidden #line 69 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(startVal.ToString())); #line default #line hidden #line 69 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(",\r\n"); #line default #line hidden #line 70 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" startVal = startVal * 2; } else { #line default #line hidden #line 75 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t"); #line default #line hidden #line 76 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Name)); #line default #line hidden #line 76 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(",\r\n"); #line default #line hidden #line 77 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" } } } #line default #line hidden #line 81 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("}\r\n/// <summary>\r\n/// Type converter for "); #line default #line hidden #line 84 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 84 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(" enumeration.\r\n/// </summary>\r\npublic class "); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("EnumConverter : System.ComponentModel.EnumConverter\r\n{\r\n\tSystem.Collections.Gener" + "ic.Dictionary<"); #line default #line hidden #line 88 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 88 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(", string> dictionary;\r\n\t\r\n\t/// <summary>\r\n /// Constructor.\r\n /// </summary" + ">\r\n public "); #line default #line hidden #line 93 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 93 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("EnumConverter() : base(typeof("); #line default #line hidden #line 93 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 93 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("))\r\n {\r\n // create lookup dictionary\r\n dictionary = new System.C" + "ollections.Generic.Dictionary<"); #line default #line hidden #line 96 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 96 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(", string>();\r\n"); #line default #line hidden #line 97 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" foreach (EnumerationLiteral literal in domainEnum.Literals) { string resourceKey = domainEnum.GetFullName(false) + "/" + literal.Name; #line default #line hidden #line 101 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("\t\tdictionary.Add("); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("."); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(literal.Name)); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(", "); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(dm.GetFullName(true))); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("DomainModel.SingletonResourceManager.GetString(\""); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey)); #line default #line hidden #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(".DisplayName\"));\r\n"); #line default #line hidden #line 103 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" } #line default #line hidden #line 105 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(" }\r\n\r\n\t/// <summary>\r\n /// Converts the specified value object to "); #line default #line hidden #line 109 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 109 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(@". /// </summary> /// <param name=""context"">An System.ComponentModel.ITypeDescriptorContext that provides a format context.</param> /// <param name=""culture"">An optional System.Globalization.CultureInfo. If not supplied, the current culture is assumed.</param> /// <param name=""value"">The System.Object to convert.</param> /// <returns>"); #line default #line hidden #line 114 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 114 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(@" object that represents the converted value.</returns> public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { string strValue = value as string; if( strValue != null ) { foreach(" ); #line default #line hidden #line 120 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 120 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(@" d in dictionary.Keys ) { if( dictionary[d] == strValue ) return d; } } return base.ConvertFrom(context, culture, value); } /// <summary> /// Converts the given value object to the specified destination type. /// </summary> /// <param name=""context"">An System.ComponentModel.ITypeDescriptorContext that provides a format context.</param> /// <param name=""culture"">An optional System.Globalization.CultureInfo. If not supplied, the current culture is assumed.</param> /// <param name=""value""> System.Object to convert.</param> /// <param name=""destinationType"">The System.Type to convert the value to.</param> /// <returns>An System.Object that represents the converted value.</returns> public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) { " ); #line default #line hidden #line 140 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 140 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("? strValue = value as "); #line default #line hidden #line 140 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write(this.ToStringHelper.ToStringWithCulture(domainEnum.Name)); #line default #line hidden #line 140 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("?;\r\n\t\tif( strValue != null )\r\n\t\t{\r\n\t\t\treturn dictionary[strValue.Value];\r\n\t\t}\r\n\r\n" + " return base.ConvertTo(context, culture, value, destinationType);\r\n }\r" + "\n}\r\n"); #line default #line hidden #line 149 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" if (!string.IsNullOrEmpty(domainEnum.Namespace)) { PopIndent(); #line default #line hidden #line 153 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" this.Write("}\r\n"); #line default #line hidden #line 155 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" } #line default #line hidden #line 158 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainEnumerationGenerator.tt" }