13 changed files with 113 additions and 51 deletions
@ -1,18 +1,28 @@
@@ -1,18 +1,28 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using ICSharpCode.NRefactory.CSharp; |
||||
using ICSharpCode.NRefactory.CSharp.Refactoring; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using ICSharpCode.NRefactory.TypeSystem.Implementation; |
||||
using ICSharpCode.SharpDevelop.Parser; |
||||
|
||||
namespace ICSharpCode.SharpDevelop |
||||
namespace ICSharpCode.NRefactory.CSharp |
||||
{ |
||||
/// <summary>
|
||||
/// C# ambience.
|
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop |
||||
{ |
||||
/// <summary>
|
||||
/// Description of DefaultAmbience.
|
||||
/// </summary>
|
||||
internal class DefaultAmbience : IAmbience |
||||
{ |
||||
public ConversionFlags ConversionFlags { get; set; } |
||||
|
||||
public string ConvertEntity(ICSharpCode.NRefactory.TypeSystem.IEntity e, ICSharpCode.NRefactory.TypeSystem.ITypeResolveContext context) |
||||
{ |
||||
return e.Name; |
||||
} |
||||
|
||||
public string ConvertType(ICSharpCode.NRefactory.TypeSystem.IType type) |
||||
{ |
||||
return type.Name; |
||||
} |
||||
|
||||
public string ConvertType(ICSharpCode.NRefactory.TypeSystem.ITypeReference type, ICSharpCode.NRefactory.TypeSystem.ITypeResolveContext context) |
||||
{ |
||||
return type.Resolve(context).Name; |
||||
} |
||||
|
||||
public string ConvertVariable(ICSharpCode.NRefactory.TypeSystem.IVariable variable, ICSharpCode.NRefactory.TypeSystem.ITypeResolveContext context) |
||||
{ |
||||
return variable.Name; |
||||
} |
||||
|
||||
public string WrapAttribute(string attribute) |
||||
{ |
||||
return attribute; |
||||
} |
||||
|
||||
public string WrapComment(string comment) |
||||
{ |
||||
return "// " + comment; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue