private void GenerateCode() { var generatedCode = ToCodeTransformer.Transform(currentQuest); resultViewer.Text = generatedCode; Clipboard.SetText(generatedCode); }
private static CodeBulk CreateCode(Quest quest, Sector sector, EditingContext context) { var path = Path.Combine( context.Code.PathToProject, "Sectors", sector.Name, "Quests", CodeEditor.FormatQuestNameToFileName(quest.Name) ); var tree = SyntaxFactory.ParseSyntaxTree(ToCodeTransformer.Transform(quest)); return(new CodeBulk(CodeBulkType.Quest, tree, path)); }