Browse Source

Removed some obsolete methods.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3814 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
21b9e13f05
  1. 2
      src/AddIns/DisplayBindings/WorkflowDesigner/Project/Src/Loaders/CodeDesignerLoader.cs
  2. 3
      src/Libraries/NRefactory/NRefactoryASTGenerator/AST/Expressions.cs
  3. 70
      src/Libraries/NRefactory/Project/Src/Ast/Generated.cs
  4. 14
      src/Libraries/NRefactory/Project/Src/Ast/TypeReference.cs
  5. 2
      src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs
  6. 5
      src/Main/Base/Project/Src/Project/Solution/Solution.cs
  7. 2
      src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs
  8. 6
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs
  9. 8
      src/Main/Base/Project/Src/Util/ExtensionMethods.cs
  10. 1
      src/Main/Core/Project/ICSharpCode.Core.csproj
  11. 54
      src/Main/Core/Project/Src/Util/AppDomainLaunchHelper.cs
  12. 11
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs

2
src/AddIns/DisplayBindings/WorkflowDesigner/Project/Src/Loaders/CodeDesignerLoader.cs

@ -272,7 +272,7 @@ namespace WorkflowDesigner.Loaders
{ {
if (type == null) if (type == null)
return; return;
if (type.SystemType != type.Type) if (type.IsKeyword)
return; return;
foreach (TypeReference tref in type.GenericTypes) { foreach (TypeReference tref in type.GenericTypes) {
FixTypeReference(tref, location, domCu); FixTypeReference(tref, location, domCu);

3
src/Libraries/NRefactory/NRefactoryASTGenerator/AST/Expressions.cs

@ -104,7 +104,6 @@ namespace NRefactoryASTGenerator.Ast
public CastExpression(TypeReference castTo, Expression expression, CastType castType) {} public CastExpression(TypeReference castTo, Expression expression, CastType castType) {}
} }
[IncludeMember("[Obsolete] public string FieldName { get { return MemberName; } set { MemberName = value; } }")]
class MemberReferenceExpression : Expression class MemberReferenceExpression : Expression
{ {
Expression targetObject; Expression targetObject;
@ -114,7 +113,6 @@ namespace NRefactoryASTGenerator.Ast
public MemberReferenceExpression(Expression targetObject, string memberName) {} public MemberReferenceExpression(Expression targetObject, string memberName) {}
} }
[IncludeMember("[Obsolete] public string Identifier { get { return MemberName; } set { MemberName = value; } }")]
class PointerReferenceExpression : Expression { class PointerReferenceExpression : Expression {
Expression targetObject; Expression targetObject;
string memberName; string memberName;
@ -152,7 +150,6 @@ namespace NRefactoryASTGenerator.Ast
public TypeOfExpression(TypeReference typeReference) {} public TypeOfExpression(TypeReference typeReference) {}
} }
[IncludeMember("[Obsolete] public TypeReferenceExpression(string typeName) : this(new TypeReference(typeName)) {}")]
class TypeReferenceExpression : Expression { class TypeReferenceExpression : Expression {
TypeReference typeReference; TypeReference typeReference;

70
src/Libraries/NRefactory/Project/Src/Ast/Generated.cs

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3053 // Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -1582,15 +1582,15 @@ namespace ICSharpCode.NRefactory.Ast {
initializer = Expression.Null; initializer = Expression.Null;
} }
public bool HasRemoveRegion { public bool HasRaiseRegion {
get { get {
return !removeRegion.IsNull; return !raiseRegion.IsNull;
} }
} }
public bool HasRaiseRegion { public bool HasRemoveRegion {
get { get {
return !raiseRegion.IsNull; return !removeRegion.IsNull;
} }
} }
@ -2339,13 +2339,6 @@ namespace ICSharpCode.NRefactory.Ast {
} }
public IfElseStatement(Expression condition, Statement trueStatement)
: this(condition) {
this.trueStatement.Add(Statement.CheckNull(trueStatement));
if (trueStatement != null) trueStatement.Parent = this;
}
public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement) public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement)
: this(condition) { : this(condition) {
this.trueStatement.Add(Statement.CheckNull(trueStatement)); this.trueStatement.Add(Statement.CheckNull(trueStatement));
@ -2360,6 +2353,13 @@ namespace ICSharpCode.NRefactory.Ast {
} }
} }
public IfElseStatement(Expression condition, Statement trueStatement)
: this(condition) {
this.trueStatement.Add(Statement.CheckNull(trueStatement));
if (trueStatement != null) trueStatement.Parent = this;
}
public bool HasElseIfSections { public bool HasElseIfSections {
get { get {
return elseIfSections.Count > 0; return elseIfSections.Count > 0;
@ -2482,21 +2482,15 @@ namespace ICSharpCode.NRefactory.Ast {
setRegion = PropertySetRegion.Null; setRegion = PropertySetRegion.Null;
} }
public bool IsReadOnly {
get {
return HasGetRegion && !HasSetRegion;
}
}
public bool HasSetRegion { public bool HasSetRegion {
get { get {
return !setRegion.IsNull; return !setRegion.IsNull;
} }
} }
public bool HasGetRegion { public bool IsReadOnly {
get { get {
return !getRegion.IsNull; return HasGetRegion && !HasSetRegion;
} }
} }
@ -2506,6 +2500,12 @@ namespace ICSharpCode.NRefactory.Ast {
} }
} }
public bool HasGetRegion {
get {
return !getRegion.IsNull;
}
}
public override object AcceptVisitor(IAstVisitor visitor, object data) { public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitIndexerDeclaration(this, data); return visitor.VisitIndexerDeclaration(this, data);
} }
@ -2829,8 +2829,6 @@ public Location ExtendedEndLocation { get; set; }
typeArguments = new List<TypeReference>(); typeArguments = new List<TypeReference>();
} }
[Obsolete] public string FieldName { get { return MemberName; } set { MemberName = value; } }
public override object AcceptVisitor(IAstVisitor visitor, object data) { public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitMemberReferenceExpression(this, data); return visitor.VisitMemberReferenceExpression(this, data);
} }
@ -3340,8 +3338,6 @@ public Location ExtendedEndLocation { get; set; }
typeArguments = new List<TypeReference>(); typeArguments = new List<TypeReference>();
} }
[Obsolete] public string Identifier { get { return MemberName; } set { MemberName = value; } }
public override object AcceptVisitor(IAstVisitor visitor, object data) { public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitPointerReferenceExpression(this, data); return visitor.VisitPointerReferenceExpression(this, data);
} }
@ -3410,9 +3406,9 @@ public Location ExtendedEndLocation { get; set; }
setRegion = PropertySetRegion.Null; setRegion = PropertySetRegion.Null;
} }
public bool HasGetRegion { public bool IsReadOnly {
get { get {
return !getRegion.IsNull; return HasGetRegion && !HasSetRegion;
} }
} }
@ -3422,9 +3418,9 @@ public Location ExtendedEndLocation { get; set; }
} }
} }
public bool IsReadOnly { public bool IsWriteOnly {
get { get {
return HasGetRegion && !HasSetRegion; return !HasGetRegion && HasSetRegion;
} }
} }
@ -3440,9 +3436,9 @@ public Location ExtendedEndLocation { get; set; }
} }
} }
public bool IsWriteOnly { public bool HasGetRegion {
get { get {
return !HasGetRegion && HasSetRegion; return !getRegion.IsNull;
} }
} }
@ -5033,8 +5029,6 @@ public Location ExtendedEndLocation { get; set; }
TypeReference = typeReference; TypeReference = typeReference;
} }
[Obsolete] public TypeReferenceExpression(string typeName) : this(new TypeReference(typeName)) {}
public override object AcceptVisitor(IAstVisitor visitor, object data) { public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitTypeReferenceExpression(this, data); return visitor.VisitTypeReferenceExpression(this, data);
} }
@ -5236,10 +5230,10 @@ public Location ExtendedEndLocation { get; set; }
Usings = usings; Usings = usings;
} }
public UsingDeclaration(string @namespace) : this(@namespace, null) {}
public UsingDeclaration(string @namespace, TypeReference alias) { usings = new List<Using>(1); usings.Add(new Using(@namespace, alias)); } public UsingDeclaration(string @namespace, TypeReference alias) { usings = new List<Using>(1); usings.Add(new Using(@namespace, alias)); }
public UsingDeclaration(string @namespace) : this(@namespace, null) {}
public override object AcceptVisitor(IAstVisitor visitor, object data) { public override object AcceptVisitor(IAstVisitor visitor, object data) {
return visitor.VisitUsingDeclaration(this, data); return visitor.VisitUsingDeclaration(this, data);
} }
@ -5415,15 +5409,15 @@ public UsingDeclaration(string @namespace, TypeReference alias) { usings = new L
Statement = statement; Statement = statement;
} }
public bool IsYieldBreak { public bool IsYieldReturn {
get { get {
return statement is BreakStatement; return statement is ReturnStatement;
} }
} }
public bool IsYieldReturn { public bool IsYieldBreak {
get { get {
return statement is ReturnStatement; return statement is BreakStatement;
} }
} }

14
src/Libraries/NRefactory/Project/Src/Ast/TypeReference.cs

@ -185,13 +185,6 @@ namespace ICSharpCode.NRefactory.Ast
} }
} }
[Obsolete("Use 'Type' instead - it now contains the SystemType for primitive types.")]
public string SystemType {
get {
return this.Type;
}
}
public int PointerNestingLevel { public int PointerNestingLevel {
get { get {
return pointerNestingLevel; return pointerNestingLevel;
@ -266,13 +259,6 @@ namespace ICSharpCode.NRefactory.Ast
this.Type = type; this.Type = type;
} }
[Obsolete("Type and SystemType are no longer distinguished - use the (string type, bool isKeyword) constructor instead!")]
public TypeReference(string type, string systemType)
{
this.Type = systemType;
this.IsKeyword = type != systemType;
}
public TypeReference(string type, bool isKeyword) public TypeReference(string type, bool isKeyword)
{ {
this.Type = type; this.Type = type;

2
src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

@ -51,7 +51,7 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
public System.Windows.Forms.IWin32Window MainWin32Window { get; private set; } public System.Windows.Forms.IWin32Window MainWin32Window { get; private set; }
public ISynchronizeInvoke SynchronizingObject { get; set; } public ISynchronizeInvoke SynchronizingObject { get; private set; }
public Window MainWindow { get { return this; } } public Window MainWindow { get { return this; } }
List<PadDescriptor> padViewContentCollection = new List<PadDescriptor>(); List<PadDescriptor> padViewContentCollection = new List<PadDescriptor>();

5
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -31,11 +31,6 @@ namespace ICSharpCode.SharpDevelop.Project
public const int SolutionVersionVS2005 = 9; public const int SolutionVersionVS2005 = 9;
public const int SolutionVersionVS2008 = 10; public const int SolutionVersionVS2008 = 10;
[Obsolete("Use SolutionVersionVS2005 instead")]
public const int SolutionVersionVS05 = 9;
[Obsolete("Use SolutionVersionVS2008 instead")]
public const int SolutionVersionVS08 = 10;
/// <summary>contains &lt;GUID, (IProject/ISolutionFolder)&gt; pairs.</summary> /// <summary>contains &lt;GUID, (IProject/ISolutionFolder)&gt; pairs.</summary>
Dictionary<string, ISolutionFolder> guidDictionary = new Dictionary<string, ISolutionFolder>(); Dictionary<string, ISolutionFolder> guidDictionary = new Dictionary<string, ISolutionFolder>();

2
src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs

@ -649,8 +649,6 @@ namespace ICSharpCode.SharpDevelop.Project
public static event EventHandler StartBuild; public static event EventHandler StartBuild;
public static event EventHandler<BuildEventArgs> EndBuild; public static event EventHandler<BuildEventArgs> EndBuild;
[Obsolete("This event is never raised.")]
public static event ProjectConfigurationEventHandler ProjectConfigurationChanged { add {} remove {} }
public static event SolutionConfigurationEventHandler SolutionConfigurationChanged; public static event SolutionConfigurationEventHandler SolutionConfigurationChanged;
public static event EventHandler<SolutionEventArgs> SolutionCreated; public static event EventHandler<SolutionEventArgs> SolutionCreated;

6
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs

@ -201,12 +201,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
return false; return false;
} }
[Obsolete("Use 'ConvertDocumentation' instead.")]
public static string GetDocumentation(string doc)
{
return ConvertDocumentation(doc);
}
static readonly Regex whitespace = new Regex(@"\s+"); static readonly Regex whitespace = new Regex(@"\s+");
/// <summary> /// <summary>

8
src/Main/Base/Project/Src/Util/ExtensionMethods.cs

@ -36,12 +36,6 @@ namespace ICSharpCode.SharpDevelop
} }
} }
[Obsolete("Use ForEach instead.")]
public static void Foreach<T>(this IEnumerable<T> input, Action<T> action)
{
ForEach(input, action);
}
/// <summary> /// <summary>
/// Adds all <paramref name="elements"/> to <paramref name="list"/>. /// Adds all <paramref name="elements"/> to <paramref name="list"/>.
/// </summary> /// </summary>
@ -111,7 +105,7 @@ namespace ICSharpCode.SharpDevelop
sealed class Win32WindowAdapter : WinForms.IWin32Window sealed class Win32WindowAdapter : WinForms.IWin32Window
{ {
System.Windows.Interop.IWin32Window window; readonly System.Windows.Interop.IWin32Window window;
public Win32WindowAdapter(System.Windows.Interop.IWin32Window window) public Win32WindowAdapter(System.Windows.Interop.IWin32Window window)
{ {

1
src/Main/Core/Project/ICSharpCode.Core.csproj

@ -113,7 +113,6 @@
<Compile Include="..\..\GlobalAssemblyInfo.cs"> <Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link> <Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="Src\Util\AppDomainLaunchHelper.cs" />
<Compile Include="Src\AddInTree\AddIn\DefaultDoozers\ToolBarItem\AbstractTextBoxCommand.cs" /> <Compile Include="Src\AddInTree\AddIn\DefaultDoozers\ToolBarItem\AbstractTextBoxCommand.cs" />
<Compile Include="Src\AddInTree\AddIn\DefaultDoozers\ToolBarItem\ITextBoxCommand.cs" /> <Compile Include="Src\AddInTree\AddIn\DefaultDoozers\ToolBarItem\ITextBoxCommand.cs" />
</ItemGroup> </ItemGroup>

54
src/Main/Core/Project/Src/Util/AppDomainLaunchHelper.cs

@ -1,54 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Globalization;
using System.Reflection;
namespace ICSharpCode.Core
{
/// <summary>
/// Because AddIn assemblies are loaded into the LoadFrom context, creating AppDomains in them that
/// use an arbitrary ApplicationBase path does not work correctly.
/// This class contains a static method that helps launching a static method on a type in a new AppDomain.
/// </summary>
/// <example>
/// <code>
/// public static class CurrentClass { // is NOT MarshalByRef
/// public static ResultClass[] GetResults()
/// {
/// AppDomainSetup setup = new AppDomainSetup();
/// setup.ApplicationBase = myApplicationBase;
/// AppDomain domain = AppDomain.CreateDomain("Display name for domain", AppDomain.CurrentDomain.Evidence, setup);
/// try {
/// return (ResultClass[])AppDomainLaunchHelper.LaunchInAppDomain(domain, typeof(CurrentClass), "GetResultsDirectly", requestObject);
/// } finally {
/// AppDomain.Unload(domain);
/// }
/// }
/// public static ResultClass[] GetResultsDirectly(Request requestObject) { ... }
/// }
/// [Serializable] class Request { ... } // must be serializable !!!
/// [Serializable] class ResultClass { ... } // must be serializable !!!
/// </code></example>
[Obsolete("This class is broken, serialization does not work and addin dependencies are not loaded in the AppDomain")]
public class AppDomainLaunchHelper : MarshalByRefObject
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
object LaunchMethod(string assemblyFile, string typeName, string methodName, object[] arguments)
{
Type t = Assembly.LoadFrom(assemblyFile).GetType(typeName);
return t.InvokeMember(methodName, (BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod), null, null, arguments, CultureInfo.InvariantCulture);
}
public static object LaunchInAppDomain(AppDomain domain, Type type, string methodName, params object[] arguments)
{
AppDomainLaunchHelper h = (AppDomainLaunchHelper)domain.CreateInstanceFromAndUnwrap(typeof(AppDomainLaunchHelper).Assembly.Location, typeof(AppDomainLaunchHelper).FullName);
return h.LaunchMethod(type.Assembly.Location, type.FullName, methodName, arguments);
}
}
}

11
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs

@ -36,17 +36,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
resolver.ProjectContent, ReturnTypeOptions.None); resolver.ProjectContent, ReturnTypeOptions.None);
} }
[Obsolete("Use the overload with ReturnTypeOptions instead")]
public static IReturnType CreateReturnType(TypeReference reference, IClass callingClass,
IMember callingMember, int caretLine, int caretColumn,
IProjectContent projectContent,
bool useLazyReturnType)
{
return CreateReturnType(reference, callingClass, callingMember, caretLine, caretColumn,
projectContent,
useLazyReturnType ? ReturnTypeOptions.Lazy : ReturnTypeOptions.None);
}
public static IReturnType CreateReturnType(TypeReference reference, IClass callingClass, public static IReturnType CreateReturnType(TypeReference reference, IClass callingClass,
IMember callingMember, int caretLine, int caretColumn, IMember callingMember, int caretLine, int caretColumn,
IProjectContent projectContent, IProjectContent projectContent,

Loading…
Cancel
Save