Browse Source

Adjust SharpDevelop to NRefactory changes (move ICSharpCode.Editor -> ICSharpCode.NRefactory.Editor; put NR.C# in separate assembly)

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
952696941a
  1. 3
      ICSharpCode.NRefactory.CSharp/.gitignore
  2. 4
      ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj
  3. 3
      ICSharpCode.NRefactory/Properties/AssemblyInfo.cs
  4. 16
      ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
  5. 2
      ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs
  6. 1
      ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractMember.cs
  7. 1
      ICSharpCode.NRefactory/TypeSystem/Implementation/TypeWithElementType.cs
  8. 6
      ICSharpCode.NRefactory/Utils/7BitEncodedInts.cs
  9. 1
      ICSharpCode.NRefactory/Utils/BitVector16.cs

3
ICSharpCode.NRefactory.CSharp/.gitignore vendored

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
bin/
obj/

4
ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj

@ -14,6 +14,10 @@ @@ -14,6 +14,10 @@
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>

3
ICSharpCode.NRefactory/Properties/AssemblyInfo.cs

@ -21,6 +21,7 @@ using System.Runtime.InteropServices; @@ -21,6 +21,7 @@ using System.Runtime.InteropServices;
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
// The assembly version has following format :
//
@ -28,4 +29,4 @@ using System.Runtime.InteropServices; @@ -28,4 +29,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyVersion("5.0.0.1")]

16
ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -95,6 +95,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -95,6 +95,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Loads the assembly definition into a project content.
/// </summary>
/// <returns>IProjectContent that represents the assembly</returns>
[CLSCompliant(false)]
public IProjectContent LoadAssembly(AssemblyDefinition assemblyDefinition)
{
if (assemblyDefinition == null)
@ -155,6 +156,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -155,6 +156,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <param name="typeDefinition">The Cecil TypeDefinition.</param>
/// <param name="projectContent">The project content used as parent for the new type.</param>
/// <returns>ITypeDefinition representing the Cecil type.</returns>
[CLSCompliant(false)]
public ITypeDefinition LoadType(TypeDefinition typeDefinition, IProjectContent projectContent)
{
if (typeDefinition == null)
@ -317,6 +319,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -317,6 +319,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// This is used to support the 'dynamic' type.</param>
/// <param name="entity">The entity that owns this type reference.
/// Used for generic type references.</param>
[CLSCompliant(false)]
public ITypeReference ReadTypeReference(
TypeReference type,
ICustomAttributeProvider typeAttributes = null,
@ -791,6 +794,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -791,6 +794,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
}
[CLSCompliant(false)]
public IAttribute ReadAttribute(CustomAttribute attribute)
{
if (attribute == null)
@ -852,6 +856,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -852,6 +856,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region Read Constant Value
[CLSCompliant(false)]
public IConstantValue ReadConstantValue(CustomAttributeArgument arg)
{
object value = arg.Value;
@ -1100,6 +1105,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1100,6 +1105,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region Read Method
[CLSCompliant(false)]
public IMethod ReadMethod(MethodDefinition method, ITypeDefinition parentType, EntityType methodType = EntityType.Method)
{
DefaultMethod m = new DefaultMethod(parentType, method.Name);
@ -1206,6 +1212,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1206,6 +1212,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region Read Parameter
[CLSCompliant(false)]
public IParameter ReadParameter(ParameterDefinition parameter, IParameterizedMember parentMember = null)
{
if (parameter == null)
@ -1248,6 +1255,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1248,6 +1255,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
|| att == FieldAttributes.FamORAssem;
}
[CLSCompliant(false)]
public IField ReadField(FieldDefinition field, ITypeDefinition parentType)
{
if (field == null)
@ -1318,6 +1326,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1318,6 +1326,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region Read Property
[CLSCompliant(false)]
public IProperty ReadProperty(PropertyDefinition property, ITypeDefinition parentType, EntityType propertyType = EntityType.Property)
{
if (property == null)
@ -1362,6 +1371,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1362,6 +1371,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region Read Event
[CLSCompliant(false)]
public IEvent ReadEvent(EventDefinition ev, ITypeDefinition parentType)
{
if (ev == null)
@ -1408,11 +1418,13 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1408,11 +1418,13 @@ namespace ICSharpCode.NRefactory.TypeSystem
return result as T;
}
[CLSCompliant(false)]
public AssemblyDefinition GetCecilObject (IProjectContent content)
{
return InternalGetCecilObject<AssemblyDefinition> (content);
}
[CLSCompliant(false)]
public TypeDefinition GetCecilObject (ITypeDefinition type)
{
if (type == null)
@ -1423,21 +1435,25 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -1423,21 +1435,25 @@ namespace ICSharpCode.NRefactory.TypeSystem
return cecilType.typeDefinition;
}
[CLSCompliant(false)]
public MethodDefinition GetCecilObject (IMethod method)
{
return InternalGetCecilObject<MethodDefinition> (method);
}
[CLSCompliant(false)]
public FieldDefinition GetCecilObject (IField field)
{
return InternalGetCecilObject<FieldDefinition> (field);
}
[CLSCompliant(false)]
public EventDefinition GetCecilObject (IEvent evt)
{
return InternalGetCecilObject<EventDefinition> (evt);
}
[CLSCompliant(false)]
public PropertyDefinition GetCecilObject (IProperty property)
{
return InternalGetCecilObject<PropertyDefinition> (property);

2
ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs

@ -83,6 +83,8 @@ namespace ICSharpCode.NRefactory @@ -83,6 +83,8 @@ namespace ICSharpCode.NRefactory
// Annotations: points either null (no annotations), to the single annotation,
// or to an AnnotationList.
// Once it is pointed at an AnnotationList, it will never change (this allows thread-safety support by locking the list)
[CLSCompliant(false)]
protected object annotations;
sealed class AnnotationList : List<object>, ICloneable

1
ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractMember.cs

@ -44,6 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -44,6 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
Accessibility accessibility;
EntityType entityType;
[CLSCompliant(false)]
protected BitVector16 flags;
const ushort FlagSealed = 0x0001;
const ushort FlagAbstract = 0x0002;

1
ICSharpCode.NRefactory/TypeSystem/Implementation/TypeWithElementType.cs

@ -23,6 +23,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -23,6 +23,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
[Serializable]
public abstract class TypeWithElementType : AbstractType
{
[CLSCompliant(false)]
protected IType elementType;
protected TypeWithElementType(IType elementType)

6
ICSharpCode.NRefactory/Utils/7BitEncodedInts.cs

@ -35,6 +35,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -35,6 +35,7 @@ namespace ICSharpCode.NRefactory.Utils
return unchecked((short)(ushort)base.Read7BitEncodedInt());
}
[CLSCompliant(false)]
public override ushort ReadUInt16()
{
return unchecked((ushort)base.Read7BitEncodedInt());
@ -45,6 +46,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -45,6 +46,7 @@ namespace ICSharpCode.NRefactory.Utils
return base.Read7BitEncodedInt();
}
[CLSCompliant(false)]
public override uint ReadUInt32()
{
return unchecked((uint)base.Read7BitEncodedInt());
@ -55,6 +57,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -55,6 +57,7 @@ namespace ICSharpCode.NRefactory.Utils
return unchecked((long)this.ReadUInt64());
}
[CLSCompliant(false)]
public override ulong ReadUInt64()
{
ulong num = 0;
@ -85,6 +88,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -85,6 +88,7 @@ namespace ICSharpCode.NRefactory.Utils
base.Write7BitEncodedInt(unchecked((ushort)value));
}
[CLSCompliant(false)]
public override void Write(ushort value)
{
base.Write7BitEncodedInt(value);
@ -95,6 +99,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -95,6 +99,7 @@ namespace ICSharpCode.NRefactory.Utils
base.Write7BitEncodedInt(value);
}
[CLSCompliant(false)]
public override void Write(uint value)
{
base.Write7BitEncodedInt(unchecked((int)value));
@ -105,6 +110,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -105,6 +110,7 @@ namespace ICSharpCode.NRefactory.Utils
this.Write(unchecked((ulong)value));
}
[CLSCompliant(false)]
public override void Write(ulong value)
{
while (value >= 128) {

1
ICSharpCode.NRefactory/Utils/BitVector16.cs

@ -24,6 +24,7 @@ namespace ICSharpCode.NRefactory.Utils @@ -24,6 +24,7 @@ namespace ICSharpCode.NRefactory.Utils
/// Holds 16 boolean values.
/// </summary>
[Serializable]
[CLSCompliant(false)]
public struct BitVector16 : IEquatable<BitVector16>
{
ushort data;

Loading…
Cancel
Save