public static void GenerateCodeFor(ScreenSave screenSave, bool save = false) { var isNetworkScreen = NetworkScreenViewModel.IsNetworked(screenSave); if (isNetworkScreen) { var screenGeneratedCode = GetGeneratedScreenCode(screenSave); var generatedScreenNetworkFilePath = CodeGeneratorCommonLogic.GetGeneratedElementNetworkFilePathFor(screenSave); CodeGeneratorCommonLogic.SaveFile(screenGeneratedCode, generatedScreenNetworkFilePath); CodeGeneratorCommonLogic.AddCodeFileToProject(generatedScreenNetworkFilePath); var customScreenNetworkFilePath = CodeGeneratorCommonLogic.GetCustomElementNetworkFilePathFor(screenSave); if (customScreenNetworkFilePath.Exists() == false) { var customScreenNetworkCode = GenerateEmptyCustomScreenNetworkCode(screenSave); CodeGeneratorCommonLogic.SaveFile(customScreenNetworkCode, customScreenNetworkFilePath); } CodeGeneratorCommonLogic.AddCodeFileToProject(customScreenNetworkFilePath); GlueCommands.Self.ProjectCommands.MakeGeneratedCodeItemsNested(); if (save) { GlueCommands.Self.ProjectCommands.SaveProjects(); } } }
public static void GenerateConfiguration() { var configurationCode = GenerateConfigurationCode(); var filePath = GetConfigurationFilePath(); CodeGeneratorCommonLogic.SaveFile(configurationCode, filePath); CodeGeneratorCommonLogic.AddCodeFileToProject(filePath); }
private static void GenerateClaimEntityMessage() { var code = GenerateClaimEntityMessageCode(); var filePath = GetClaimEntityFilePath(); CodeGeneratorCommonLogic.SaveFile(code, filePath); CodeGeneratorCommonLogic.AddCodeFileToProject(filePath); }
public static void GenerateCodeFor(EntitySave entitySave, bool save = true) { var isNetworkEntity = NetworkEntityViewModel.IsNetworked(entitySave); if (isNetworkEntity) { var entityGeneratedCode = GetGeneratedEntityNetworkCode(entitySave); var generatedEntityNetworkFilePath = CodeGeneratorCommonLogic.GetGeneratedElementNetworkFilePathFor(entitySave); CodeGeneratorCommonLogic.SaveFile(entityGeneratedCode, generatedEntityNetworkFilePath); CodeGeneratorCommonLogic.AddCodeFileToProject(generatedEntityNetworkFilePath); var netStateGeneratedCode = GenerateNetStateGeneratedCode(entitySave); var generatedNetStateFilePath = CodeGeneratorCommonLogic.GetGeneratedNetStateFilePathFor(entitySave); CodeGeneratorCommonLogic.SaveFile(netStateGeneratedCode, generatedNetStateFilePath); CodeGeneratorCommonLogic.AddCodeFileToProject(generatedNetStateFilePath); var customNetStateFilePath = CodeGeneratorCommonLogic.GetCustomNetStateFilePathFor(entitySave); if (customNetStateFilePath.Exists() == false) { var customNetStateCode = GenerateEmptyCustomNetStateCode(entitySave); CodeGeneratorCommonLogic.SaveFile(customNetStateCode, customNetStateFilePath); } CodeGeneratorCommonLogic.AddCodeFileToProject(customNetStateFilePath); var customEntityNetworkFilePath = CodeGeneratorCommonLogic.GetCustomElementNetworkFilePathFor(entitySave); if (customEntityNetworkFilePath.Exists() == false) { var customEntityNetworkCode = GenerateEmptyCustomEntityNetworkCode(entitySave); CodeGeneratorCommonLogic.SaveFile(customEntityNetworkCode, customEntityNetworkFilePath); } CodeGeneratorCommonLogic.AddCodeFileToProject(customEntityNetworkFilePath); GlueCommands.Self.ProjectCommands.MakeGeneratedCodeItemsNested(); if (save) { GlueCommands.Self.ProjectCommands.SaveProjects(); } } }