diff options
Diffstat (limited to 'main')
9 files changed, 30 insertions, 90 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs index 1a752ea206..a0277eb99d 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs @@ -584,22 +584,6 @@ namespace MonoDevelop.CSharp.Formatting #endregion - #region Code Style options - bool placeSystemDirectiveFirst = true; - [Obsolete("Not used anymore.")] - [ItemProperty] - public bool PlaceSystemDirectiveFirst { - get { - return placeSystemDirectiveFirst; - } - - set { - placeSystemDirectiveFirst = value; - } - } - - #endregion - public CSharpFormattingPolicy () { this.options = TypeSystemService.Workspace?.Options; diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs index 18d9ca7f3d..70a7f4462c 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs @@ -1149,8 +1149,7 @@ namespace MonoDevelop.DesignerSupport.Toolbox } } - [Obsolete("This class should never have been public")] - public class Item : IComparable<Item> + class Item : IComparable<Item> { ToolboxWidgetItem inner; diff --git a/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs b/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs index 0ecc94b5a9..27562c546d 100644 --- a/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs +++ b/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs @@ -66,17 +66,6 @@ namespace MonoDevelop.Xml.Completion }
/// <summary>
- /// Creates completion data from the schema passed in
- /// via the reader object.
- /// </summary> - [Obsolete ("Please pass in a TextReader instead")]
- public XmlSchemaCompletionData(XmlTextReader reader)
- {
- reader.XmlResolver = new LocalOnlyXmlResolver ();
- ReadSchema(reader);
- }
-
- /// <summary>
/// Creates the completion data from the specified schema file.
/// </summary>
public XmlSchemaCompletionData (string fileName) : this (String.Empty, fileName)
diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs index d42a97274a..b2f5e61359 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs @@ -1397,12 +1397,6 @@ namespace Mono.TextEditor update = foldedSegmentAdded || countChanged || foldedFoldingRemoved; return newFoldedSegments; } - - [Obsolete("Doesn't do anything anymore")] - public void WaitForFoldUpdateFinished () - { - // nothing - } internal void InterruptFoldWorker () { diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/RemoteProcessConnection.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/RemoteProcessConnection.cs index aa974f8028..2d804cf738 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/RemoteProcessConnection.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/RemoteProcessConnection.cs @@ -156,15 +156,6 @@ namespace MonoDevelop.Core.Execution } } - [Obsolete ("Use Disconnect()")] - public void Disconnect (bool waitUntilDone) - { - if (waitUntilDone) - Disconnect ().Wait (TimeSpan.FromSeconds (7)); - else - Disconnect ().Ignore (); - } - public async Task Disconnect () { StopPinger (); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs index e35886fdfe..57f4a1f42b 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs @@ -37,7 +37,7 @@ using System.Linq; namespace MonoDevelop.Projects.MSBuild { - public abstract class MSBuildFileFormat + public abstract class MSBuildFileFormat : IComparable<MSBuildFileFormat>, IEquatable<MSBuildFileFormat> { readonly SlnFileFormat slnFileFormat; @@ -51,9 +51,6 @@ namespace MonoDevelop.Projects.MSBuild public static readonly MSBuildFileFormat VS2010 = new MSBuildFileFormatVS10 (); public static readonly MSBuildFileFormat VS2012 = new MSBuildFileFormatVS12 (); - [Obsolete("This is the same as VS2012")] - public static readonly MSBuildFileFormat VS2017 = VS2012; - public static IEnumerable<MSBuildFileFormat> GetSupportedFormats () { yield return VS2012; @@ -68,12 +65,6 @@ namespace MonoDevelop.Projects.MSBuild } public static MSBuildFileFormat DefaultFormat => VS2012; - - [Obsolete ("Use ProductDescription or ID")] - public string Name => "MSBuild"; - - [Obsolete] - public abstract Version Version { get; } internal SlnFileFormat SlnFileFormat { get { return slnFileFormat; } @@ -229,17 +220,41 @@ namespace MonoDevelop.Projects.MSBuild } return string.Empty; } - + public abstract string Id { get; } + + #region IComparable<MSBuildFileFormat> implementation and overloads + + public override bool Equals (object obj) => obj is MSBuildFileFormat other && Equals (other); + public bool Equals (MSBuildFileFormat other) => other != null && Id == other.Id; + public override int GetHashCode () => Id.GetHashCode (); + + public int CompareTo (MSBuildFileFormat other) => Version.Parse (SlnVersion).CompareTo (Version.Parse (other.SlnVersion)); + + public static bool operator == (MSBuildFileFormat a, MSBuildFileFormat b) + { + if (ReferenceEquals (a, b)) + return true; + + if (a is null) + return b is null; + + return a.Equals (b); + } + + public static bool operator != (MSBuildFileFormat a, MSBuildFileFormat b) => !(a == b); + public static bool operator < (MSBuildFileFormat a, MSBuildFileFormat b) => a.CompareTo (b) < 0; + public static bool operator > (MSBuildFileFormat a, MSBuildFileFormat b) => a.CompareTo (b) > 0; + public static bool operator <= (MSBuildFileFormat a, MSBuildFileFormat b) => a.CompareTo (b) <= 0; + public static bool operator >= (MSBuildFileFormat a, MSBuildFileFormat b) => a.CompareTo (b) >= 0; + + #endregion } class MSBuildFileFormatVS05 : MSBuildFileFormat { public override string Id => "MSBuild05"; - [Obsolete("Unused")] - public override Version Version => new Version ("2005"); - public override string DefaultProductVersion => "8.0.50727"; public override string DefaultToolsVersion => "2.0"; public override string DefaultSchemaVersion => "2.0"; @@ -255,9 +270,6 @@ namespace MonoDevelop.Projects.MSBuild { public override string Id => "MSBuild08"; - [Obsolete ("Unused")] - public override Version Version => new Version ("2008"); - public override string DefaultProductVersion => "9.0.21022"; public override string DefaultToolsVersion => "3.5"; public override string DefaultSchemaVersion => "2.0"; @@ -279,9 +291,6 @@ namespace MonoDevelop.Projects.MSBuild { public override string Id => "MSBuild10"; - [Obsolete ("Unused")] - public override Version Version => new Version ("2010"); - public override string DefaultProductVersion => "8.0.30703"; public override string DefaultSchemaVersion => "2.0"; public override string DefaultToolsVersion => "4.0"; @@ -294,9 +303,6 @@ namespace MonoDevelop.Projects.MSBuild { public override string Id => "MSBuild12"; - [Obsolete ("Unused")] - public override Version Version => new Version ("2012"); - // This is mostly irrelevant, the builder always uses the latest // tools version. It's only used for new projects created with // the old project template engine. diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs index 9e7fef13ea..a954a6d4b2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs @@ -263,12 +263,6 @@ namespace MonoDevelop.Ide.CodeCompletion controller.HideWindow (); } - [Obsolete("Use CompletionWindowManager.ToggleCategoryMode")] - public void ToggleCategoryMode () - { - controller.ToggleCategoryMode (); - } - /// <summary> /// Gets or sets a value indicating that shift was pressed during enter. /// </summary> diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs index 70e04f0f73..6a780c7408 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs @@ -416,12 +416,6 @@ namespace MonoDevelop.Ide.Gui AlertButton.CloseWithoutSave, AlertButton.Cancel, doc.Window.ViewContent.IsUntitled ? AlertButton.SaveAs : AlertButton.Save); } - [Obsolete("Use CloseAllDocumentsAsync")] - public void CloseAllDocuments (bool leaveActiveDocumentOpen) - { - CloseAllDocumentsAsync (leaveActiveDocumentOpen).Ignore (); - } - public async Task CloseAllDocumentsAsync (bool leaveActiveDocumentOpen) { Document[] docs = new Document [Documents.Count]; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs index fbd88c1e4c..3124ad9a0d 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs @@ -84,16 +84,5 @@ namespace MonoDevelop.Ide.TypeSystem } return false; } - - [Obsolete ("Use p.IsCompileable")] - public static bool IsCompileableFile (ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck) - => IsCompileableFile (null, file, out sck); - - [Obsolete ("Use p.IsCompileable")] - public static bool IsCompileableFile (MonoDevelop.Projects.Project p, ProjectFile file, out Microsoft.CodeAnalysis.SourceCodeKind sck) - { - sck = file.SourceCodeKind; - return p.IsCompileable (file.FilePath); - } } } |