public Thread saveEditorContents() { if (MethodStreamFile.fileExists() && MethodStreamFile.contains("".tempDir())) { "deleting previous temp temp file: {0}".info(MethodStreamFile); Files.deleteFile(MethodStreamFile); // delete previous file since we don't need it anymore } "saving editor contents: {0}".info(MethodStreamFile); var code = CodeViewer.get_Text(); MethodStreamFile = code.saveWithExtension(".cs"); return(processCodeViewerContents()); }