diff options
author | Anže Vodovnik <anvod@microsoft.com> | 2019-06-19 19:44:59 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-07-03 20:06:03 +0300 |
commit | 107025544efe812599ebcd5bcfdcc823825e7256 (patch) | |
tree | ce6deb1d0bb1b41d1f600028c4341c6c4a7a32a9 /main | |
parent | 633c9d8e427fcdadfb1a20a61153041d6bed2543 (diff) |
Addressing PR comments, removing unnecessary Console.WriteLines.
Diffstat (limited to 'main')
3 files changed, 4 insertions, 8 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MiscellaneousFilesWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MiscellaneousFilesWorkspace.cs index 10c9be2fc2..94746c5c36 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MiscellaneousFilesWorkspace.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MiscellaneousFilesWorkspace.cs @@ -206,7 +206,6 @@ namespace MonoDevelop.Ide.TypeSystem filePath: filePath,
loader: TextLoader.From (sourceTextContainer, VersionStamp.Create ()));
- Console.WriteLine ($"Misc: Added {openDocumentInfo.FilePath}"); OnDocumentAdded (documentInfo);
OnDocumentOpened (documentId, sourceTextContainer);
}
@@ -221,7 +220,6 @@ namespace MonoDevelop.Ide.TypeSystem if (documentId != null) {
OnDocumentClosed (documentId, EmptyTextLoader.Instance);
OnDocumentRemoved (documentId);
- Console.WriteLine ($"Misc: Removed {openDocumentInfo.FilePath}"); openDocumentInfo.DocumentId = null;
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs index c7091b0934..7f59e41ec5 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs @@ -1328,7 +1328,7 @@ namespace MonoDevelop.Ide.TypeSystem .FirstOrDefault (d => d.IsFile && document.FilePath.Equals (d.FilePath, FilePath.PathComparison)); - DispatchService.PumpingWait (() => guiDoc.IsDirty ? guiDoc.Save () : null); + DispatchService.PumpingWait (() => guiDoc.IsDirty ? guiDoc.Save () : Task.CompletedTask); // TODO: the Visual Studio Windows implementation of this also adds an undo unit to the // global undo manager which we don't currently support. @@ -1340,12 +1340,12 @@ namespace MonoDevelop.Ide.TypeSystem var mdFile = mdProject.GetProjectFile (document.FilePath); if (mdFile == null) { - // TODO: log this + LoggingService.LogWarning ($"{document.FilePath} was not found in project in ApplyDocumentInfo"); return; } DispatchService.PumpingWait (() => { - return Runtime.RunInMainThread (async () => { + return Runtime.RunInMainThread (() => { FileService.RenameFile (document.FilePath, newName); @@ -1385,7 +1385,7 @@ namespace MonoDevelop.Ide.TypeSystem return files; } - void FailIfDocumentInfoChangesNotSupported (Document document, DocumentInfo updatedInfo) + static void FailIfDocumentInfoChangesNotSupported (Document document, DocumentInfo updatedInfo) { if (document.SourceCodeKind != updatedInfo.SourceCodeKind) { throw new InvalidOperationException ( diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService_WorkspaceHandling.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService_WorkspaceHandling.cs index f05330a84e..a9a6c33112 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService_WorkspaceHandling.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService_WorkspaceHandling.cs @@ -310,7 +310,6 @@ namespace MonoDevelop.Ide.TypeSystem void TryRegisterOpenDocument (OpenDocumentReference reference) { - Console.WriteLine ($"Try Register Open Document: {reference.FilePath}"); // First offer the document to the primary workspace and see if it's owned by it. // This is the common case, so avoid adding the document to the miscellaneous workspace // unnecessarily, as it will be immediately removed anyway. @@ -320,7 +319,6 @@ namespace MonoDevelop.Ide.TypeSystem if (reference.HandleMiscNamespace) { // If the primary workspace didn't claim the document notify the miscellaneous workspace miscellaneousFilesWorkspace.OnDocumentOpened (reference.FilePath, reference.TextBuffer); - Console.WriteLine ("Try Register Open Document: Handle Misc Workspace"); } } |