Browse Source

Merge 3.1.1 to trunk.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5334 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
fe47d5f460
  1. 4
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj
  2. 3
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs
  3. 25
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BindNamespacesWithoutRemovingErrors.cs
  4. 89
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooParser.cs
  5. 24
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ExpressionFinder.cs
  6. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj
  7. 68
      src/AddIns/BackendBindings/Boo/BooBinding/Test/ExpressionFinderTests.cs
  8. 29
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerLoader/NRefactoryDesignerLoader.cs
  9. 2
      src/Libraries/NRefactory/Project/Src/Ast/TypeReference.cs
  10. 28
      src/Libraries/NRefactory/Project/Src/PrettyPrinter/VBNet/VBNetOutputVisitor.cs
  11. 25
      src/Libraries/NRefactory/Project/Src/Visitors/CodeDOMOutputVisitor.cs
  12. 4
      src/Libraries/NRefactory/Test/NRefactoryTests.csproj
  13. 10
      src/Libraries/NRefactory/Test/NRefactoryTests.csproj.user
  14. 33
      src/Libraries/NRefactory/Test/Output/CodeDOM/CodeDOMTypeReferenceTest.cs
  15. 15
      src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs
  16. 5
      src/Main/Base/Project/Src/Commands/CustomStringTagProvider.cs
  17. 8
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/CSharpToVBNetConvertVisitor.cs
  18. 35
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/CodeSnippetConverter.cs
  19. 77
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/CodeGenerator.cs
  20. 24
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs
  21. 1
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ICSharpCode.SharpDevelop.Dom.Tests.csproj
  22. 59
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ImplementInterfaceTests.cs
  23. 24
      src/Setup/Files.wxs
  24. BIN
      src/Tools/NUnit/lib/nunit-console-runner.dll
  25. BIN
      src/Tools/NUnit/lib/nunit-gui-runner.dll
  26. BIN
      src/Tools/NUnit/lib/nunit.core.dll
  27. BIN
      src/Tools/NUnit/lib/nunit.core.interfaces.dll
  28. BIN
      src/Tools/NUnit/lib/nunit.fixtures.dll
  29. BIN
      src/Tools/NUnit/lib/nunit.uiexception.dll
  30. BIN
      src/Tools/NUnit/lib/nunit.uikit.dll
  31. BIN
      src/Tools/NUnit/lib/nunit.util.dll
  32. BIN
      src/Tools/NUnit/nunit-console-dotnet2-x86.exe
  33. BIN
      src/Tools/NUnit/nunit-console-dotnet2.exe
  34. BIN
      src/Tools/NUnit/nunit-console-x86.exe
  35. BIN
      src/Tools/NUnit/nunit-console.exe
  36. 4
      src/Tools/NUnit/nunit-console/AssemblyInfo.cs
  37. 11
      src/Tools/NUnit/nunit-console/ExtendedRunner.cs
  38. BIN
      src/Tools/NUnit/nunit.framework.dll

4
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj

@ -33,6 +33,9 @@ @@ -33,6 +33,9 @@
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="Boo.Lang.Extensions">
<HintPath>..\..\RequiredLibraries\Boo.Lang.Extensions.dll</HintPath>
</Reference>
<Reference Include="Boo.Lang.Interpreter">
<HintPath>..\..\RequiredLibraries\Boo.Lang.Interpreter.dll</HintPath>
</Reference>
@ -68,6 +71,7 @@ @@ -68,6 +71,7 @@
<Compile Include="Src\BooProject.cs" />
<Compile Include="Src\BooProjectBinding.cs" />
<Compile Include="Src\BooAmbience.cs" />
<Compile Include="Src\CodeCompletion\BindNamespacesWithoutRemovingErrors.cs" />
<Compile Include="Src\CodeCompletion\BooParser.cs" />
<Compile Include="Src\CodeCompletion\ExpressionFinder.cs" />
<Compile Include="Src\CodeCompletion\ConvertVisitor.cs" />

3
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs

@ -101,9 +101,12 @@ namespace Grunwald.BooBinding @@ -101,9 +101,12 @@ namespace Grunwald.BooBinding
pc.AddReferencedContent(AssemblyParserService.GetProjectContentForReference(systemItem));
ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location);
pc.AddReferencedContent(AssemblyParserService.GetProjectContentForReference(booLangItem));
ReferenceProjectItem booExtensionsItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Extensions.PropertyAttribute).Assembly.Location);
pc.AddReferencedContent(AssemblyParserService.GetProjectContentForReference(booExtensionsItem));
pc.DefaultImports = new DefaultUsing(pc);
pc.DefaultImports.Usings.Add("Boo.Lang");
pc.DefaultImports.Usings.Add("Boo.Lang.Builtins");
pc.DefaultImports.Usings.Add("Boo.Lang.Extensions");
return pc;
}

25
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BindNamespacesWithoutRemovingErrors.cs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using Boo.Lang.Compiler.Steps;
namespace Grunwald.BooBinding.CodeCompletion
{
/// <summary>
/// The Boo 'BindNamespaces' step will remove imports that cannot be resolved.
/// However, we need to keep those imports available for use inside SharpDevelop.
/// </summary>
public class BindNamespacesWithoutRemovingErrors : BindNamespaces
{
public override void OnImport(Boo.Lang.Compiler.Ast.Import import)
{
base.OnImport(import);
ReplaceCurrentNode(import); // prevent removal of import
}
}
}

89
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooParser.cs

@ -163,24 +163,87 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -163,24 +163,87 @@ namespace Grunwald.BooBinding.CodeCompletion
compiler.Parameters.OutputWriter = new StringWriter();
compiler.Parameters.TraceLevel = System.Diagnostics.TraceLevel.Off;
Compile compilePipe = new Compile();
// Compile pipeline as of Boo 0.9.2:
// Boo.Lang.Compiler.Pipelines.Parse:
// Boo.Lang.Parser.BooParsingStep
// Boo.Lang.Compiler.Pipelines.ExpandMacros:
// Boo.Lang.Compiler.Steps.InitializeTypeSystemServices
// Boo.Lang.Compiler.Steps.PreErrorChecking
// Boo.Lang.Compiler.Steps.MergePartialClasses
// Boo.Lang.Compiler.Steps.InitializeNameResolutionService
// Boo.Lang.Compiler.Steps.IntroduceGlobalNamespaces
// Boo.Lang.Compiler.Steps.TransformCallableDefinitions
// Boo.Lang.Compiler.Steps.BindTypeDefinitions
// Boo.Lang.Compiler.Steps.BindGenericParameters
// Boo.Lang.Compiler.Steps.BindNamespaces
// Boo.Lang.Compiler.Steps.BindBaseTypes
// Boo.Lang.Compiler.Steps.MacroAndAttributeExpansion
// Boo.Lang.Compiler.Pipelines.ResolveExpressions:
// Boo.Lang.Compiler.Steps.ExpandAstLiterals
// Boo.Lang.Compiler.Steps.IntroduceModuleClasses
// Boo.Lang.Compiler.Steps.NormalizeStatementModifiers
// Boo.Lang.Compiler.Steps.NormalizeTypeAndMemberDefinitions
// Boo.Lang.Compiler.Steps.NormalizeOmittedExpressions
// Boo.Lang.Compiler.Steps.BindTypeDefinitions
// Boo.Lang.Compiler.Steps.BindGenericParameters
// Boo.Lang.Compiler.Steps.BindEnumMembers
// Boo.Lang.Compiler.Steps.BindBaseTypes
// Boo.Lang.Compiler.Steps.CheckMemberTypes
// Boo.Lang.Compiler.Steps.BindMethods
// Boo.Lang.Compiler.Steps.ResolveTypeReferences
// Boo.Lang.Compiler.Steps.BindTypeMembers
// Boo.Lang.Compiler.Steps.CheckGenericConstraints
// Boo.Lang.Compiler.Steps.ProcessInheritedAbstractMembers
// Boo.Lang.Compiler.Steps.CheckMemberNames
// Boo.Lang.Compiler.Steps.ProcessMethodBodiesWithDuckTyping
// Boo.Lang.Compiler.Steps.PreProcessExtensionMethods
// Boo.Lang.Compiler.Pipelines.Compile:
// Boo.Lang.Compiler.Steps.ConstantFolding
// Boo.Lang.Compiler.Steps.NormalizeLiterals
// Boo.Lang.Compiler.Steps.OptimizeIterationStatements
// Boo.Lang.Compiler.Steps.BranchChecking
// Boo.Lang.Compiler.Steps.CheckIdentifiers
// Boo.Lang.Compiler.Steps.StricterErrorChecking
// Boo.Lang.Compiler.Steps.CheckAttributesUsage
// Boo.Lang.Compiler.Steps.ExpandDuckTypedExpressions
// Boo.Lang.Compiler.Steps.ProcessAssignmentsToValueTypeMembers
// Boo.Lang.Compiler.Steps.ExpandProperties
// Boo.Lang.Compiler.Steps.RemoveDeadCode
// Boo.Lang.Compiler.Steps.CheckMembersProtectionLevel
// Boo.Lang.Compiler.Steps.NormalizeIterationStatements
// Boo.Lang.Compiler.Steps.ProcessSharedLocals
// Boo.Lang.Compiler.Steps.ProcessClosures
// Boo.Lang.Compiler.Steps.ProcessGenerators
// Boo.Lang.Compiler.Steps.ExpandVarArgsMethodInvocations
// Boo.Lang.Compiler.Steps.InjectCallableConversions
// Boo.Lang.Compiler.Steps.ImplementICallableOnCallableDefinitions
// Boo.Lang.Compiler.Steps.CheckNeverUsedMembers
// Boo.Lang.Compiler.Pipelines.CompileToMemory:
// Boo.Lang.Compiler.Steps.EmitAssembly
// Boo.Lang.Compiler.Pipelines.CompileToFile:
// Boo.Lang.Compiler.Steps.SaveAssembly
CompilerPipeline compilePipe = new Parse();
compilePipe.Add(new InitializeTypeSystemServices());
compilePipe.Add(new PreErrorChecking());
compilePipe.Add(new MergePartialClasses());
compilePipe.Add(new InitializeNameResolutionService());
compilePipe.Add(new IntroduceGlobalNamespaces());
// TransformCallableDefinitions: not used for CC
compilePipe.Add(new BindTypeDefinitions());
compilePipe.Add(new BindGenericParameters());
compilePipe.Add(new BindNamespacesWithoutRemovingErrors());
compilePipe.Add(new BindBaseTypes());
compilePipe.Add(new MacroAndAttributeExpansion());
compilePipe.Add(new IntroduceModuleClasses());
BooParsingStep parsingStep = (BooParsingStep)compilePipe[0];
parsingStep.TabSize = 1;
ConvertVisitor visitor = new ConvertVisitor(lineLength, projectContent);
visitor.Cu.FileName = fileName;
// Remove unneccessary compiler steps
int num = 1 + compilePipe.Find(typeof(NormalizeStatementModifiers));
compilePipe[num] = visitor;
while (compilePipe.Count > num + 1)
compilePipe.RemoveAt(compilePipe.Count - 1);
num = compilePipe.Find(typeof(TransformCallableDefinitions));
compilePipe.RemoveAt(num);
//for (int i = 0; i < compilePipe.Count; i++) {
// Console.WriteLine(compilePipe[i]);
//}
compilePipe.Add(visitor);
compilePipe.BreakOnErrors = false;
compiler.Parameters.Pipeline = compilePipe;

24
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ExpressionFinder.cs

@ -14,14 +14,14 @@ using ICSharpCode.SharpDevelop.Dom; @@ -14,14 +14,14 @@ using ICSharpCode.SharpDevelop.Dom;
namespace Grunwald.BooBinding.CodeCompletion
{
// TODO: We could need some unit tests for this.
public class ExpressionFinder : IExpressionFinder
{
string fileName;
public ExpressionFinder()
{
}
public ExpressionFinder(string fileName)
{
this.fileName = fileName;
}
#region RemoveLastPart
@ -79,6 +79,14 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -79,6 +79,14 @@ namespace Grunwald.BooBinding.CodeCompletion
const string _openingBrackets = "{[(";
public ExpressionResult FindExpression(string inText, int offset)
{
ExpressionResult r = FindExpressionInternal(inText, offset);
if (string.IsNullOrEmpty(r.Expression))
r.Expression = null;
return r;
}
ExpressionResult FindExpressionInternal(string inText, int offset)
{
offset--; // earlier all ExpressionFinder calls had an inexplicable "cursor - 1".
// The IExpressionFinder API now uses normal cursor offsets, so we need to adjust the offset
@ -154,7 +162,8 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -154,7 +162,8 @@ namespace Grunwald.BooBinding.CodeCompletion
ExpressionResult GetExpression(string inText, int start, int end)
{
if (start == end) return ExpressionResult.Empty;
if (start == end)
return new ExpressionResult(string.Empty);
StringBuilder b = new StringBuilder();
bool wasSpace = true;
int i = start;
@ -234,7 +243,7 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -234,7 +243,7 @@ namespace Grunwald.BooBinding.CodeCompletion
#region Find Full Expression
public ExpressionResult FindFullExpression(string inText, int offset)
{
ExpressionResult result = FindExpression(inText, offset);
ExpressionResult result = FindExpressionInternal(inText, offset);
if (result.Expression == null)
return result;
StringBuilder b = new StringBuilder(result.Expression);
@ -261,7 +270,10 @@ namespace Grunwald.BooBinding.CodeCompletion @@ -261,7 +270,10 @@ namespace Grunwald.BooBinding.CodeCompletion
} else {
if (bracketStack.Count == 0) {
b.Append(inText, offset, i - offset);
result.Expression = b.ToString();
if (b.Length == 0)
result.Expression = null;
else
result.Expression = b.ToString();
return result;
} else if (c == '\0') {
// end of document

1
src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj

@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ExpressionFinderTests.cs" />
<Compile Include="ResolverTests.cs" />
</ItemGroup>
<ItemGroup>

68
src/AddIns/BackendBindings/Boo/BooBinding/Test/ExpressionFinderTests.cs

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using Grunwald.BooBinding.CodeCompletion;
using ICSharpCode.SharpDevelop.Dom;
using NUnit.Framework;
namespace Grunwald.BooBinding.Tests
{
[TestFixture]
public class ExpressionFinderTests
{
const string code = "class A:\n\tpublic simple = 1\n// comment\ndef main():\n\tpass";
ExpressionFinder ef = new ExpressionFinder();
void FindFull(string program, string location, string expectedExpression, ExpressionContext expectedContext)
{
int pos = program.IndexOf(location);
if (pos < 0) Assert.Fail("location not found in program");
ExpressionResult er = ef.FindFullExpression(program, pos);
Assert.AreEqual(expectedExpression, er.Expression);
if (expectedContext != null) {
Assert.AreEqual(expectedContext, er.Context);
}
}
[Test]
public void Simple()
{
FindFull(code, "mple = 1", "simple", ExpressionContext.Default);
}
[Test]
public void SimpleBeginningOfExpression()
{
FindFull(code, "simple = 1", "simple", ExpressionContext.Default);
}
[Test]
public void NoMatchForComment1()
{
FindFull(code, "// comment", null, null);
}
[Test]
public void NoMatchForComment2()
{
FindFull(code, "/ comment", null, null);
}
[Test]
public void NoMatchForComment3()
{
FindFull(code, " comment", null, null);
}
[Test]
public void NoMatchForComment4()
{
FindFull(code, "comment", null, null);
}
}
}

29
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerLoader/NRefactoryDesignerLoader.cs

@ -19,6 +19,7 @@ using ICSharpCode.NRefactory.Ast; @@ -19,6 +19,7 @@ using ICSharpCode.NRefactory.Ast;
using ICSharpCode.NRefactory.Visitors;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ReturnTypeOptions = ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.TypeVisitor.ReturnTypeOptions;
namespace ICSharpCode.FormsDesigner
{
@ -213,8 +214,8 @@ namespace ICSharpCode.FormsDesigner @@ -213,8 +214,8 @@ namespace ICSharpCode.FormsDesigner
}
TypeDeclaration typeDecl = o as TypeDeclaration;
if (typeDecl != null) {
foreach (TypeReference tref in typeDecl.BaseTypes) {
FixTypeReference(tref, typeDecl.StartLocation, domCu);
for (int i = 0; i < typeDecl.BaseTypes.Count; i++) {
typeDecl.BaseTypes[i] = FixTypeReference(typeDecl.BaseTypes[i], typeDecl.StartLocation, domCu, ReturnTypeOptions.BaseTypeReference);
}
for (int i = 0; i < typeDecl.Children.Count; i++) {
object child = typeDecl.Children[i];
@ -242,28 +243,26 @@ namespace ICSharpCode.FormsDesigner @@ -242,28 +243,26 @@ namespace ICSharpCode.FormsDesigner
}
FieldDeclaration fieldDecl = o as FieldDeclaration;
if (fieldDecl != null) {
FixTypeReference(fieldDecl.TypeReference, fieldDecl.StartLocation, domCu);
fieldDecl.TypeReference = FixTypeReference(fieldDecl.TypeReference, fieldDecl.StartLocation, domCu, ReturnTypeOptions.None);
foreach (VariableDeclaration var in fieldDecl.Fields) {
if (var != null) {
FixTypeReference(var.TypeReference, fieldDecl.StartLocation, domCu);
var.TypeReference = FixTypeReference(var.TypeReference, fieldDecl.StartLocation, domCu, ReturnTypeOptions.None);
}
}
}
}
void FixTypeReference(TypeReference type, Location location, ICSharpCode.SharpDevelop.Dom.ICompilationUnit domCu)
TypeReference FixTypeReference(TypeReference type, Location location, ICompilationUnit domCu, ReturnTypeOptions options)
{
if (type == null)
return;
if (type.Type != type.Type)
return;
foreach (TypeReference tref in type.GenericTypes) {
FixTypeReference(tref, location, domCu);
}
if (type == null || type.IsKeyword)
return type;
ICSharpCode.SharpDevelop.Dom.IClass curType = domCu.GetInnermostClass(location.Y, location.X);
ICSharpCode.SharpDevelop.Dom.IReturnType rt = domCu.ProjectContent.SearchType(new SearchTypeRequest(type.Type, type.GenericTypes.Count, curType, domCu, location.Y, location.X)).Result;
if (rt != null) {
type.Type = rt.FullyQualifiedName;
IReturnType rt = SharpDevelop.Dom.NRefactoryResolver.TypeVisitor.CreateReturnType(
type, curType, null, location.Y, location.X, domCu.ProjectContent, options);
if (rt != null && rt.GetUnderlyingClass() != null) {
return SharpDevelop.Dom.Refactoring.CodeGenerator.ConvertType(rt, null);
} else {
return type;
}
}

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

@ -425,7 +425,7 @@ namespace ICSharpCode.NRefactory.Ast @@ -425,7 +425,7 @@ namespace ICSharpCode.NRefactory.Ast
public override string ToString()
{
return "[InnerClassTypeReference: (" + baseType.ToString() + ")." + base.ToString() + "]";
return baseType.ToString() + "+" + base.ToString();
}
}
}

28
src/Libraries/NRefactory/Project/Src/PrettyPrinter/VBNet/VBNetOutputVisitor.cs

@ -2655,6 +2655,34 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -2655,6 +2655,34 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintToken(Tokens.OpenParenthesis);
AppendCommaSeparatedList(objectCreateExpression.Parameters);
outputFormatter.PrintToken(Tokens.CloseParenthesis);
CollectionInitializerExpression initializer = objectCreateExpression.ObjectInitializer;
if (!initializer.IsNull) {
outputFormatter.Space();
outputFormatter.PrintToken(Tokens.With);
outputFormatter.Space();
outputFormatter.PrintToken(Tokens.OpenCurlyBrace);
outputFormatter.IndentationLevel++;
for (int i = 0; i < initializer.CreateExpressions.Count; i++) {
Expression expr = initializer.CreateExpressions[i];
if (i > 0)
outputFormatter.PrintToken(Tokens.Comma);
outputFormatter.PrintLineContinuation();
outputFormatter.Indent();
NamedArgumentExpression nae = expr as NamedArgumentExpression;
if (nae != null) {
outputFormatter.PrintToken(Tokens.Dot);
outputFormatter.PrintIdentifier(nae.Name);
outputFormatter.Space();
outputFormatter.PrintToken(Tokens.Assign);
outputFormatter.Space();
TrackedVisit(nae.Expression, data);
}
}
outputFormatter.IndentationLevel--;
outputFormatter.PrintLineContinuation();
outputFormatter.Indent();
outputFormatter.PrintToken(Tokens.CloseCurlyBrace);
}
return null;
}

25
src/Libraries/NRefactory/Project/Src/Visitors/CodeDOMOutputVisitor.cs

@ -78,17 +78,32 @@ namespace ICSharpCode.NRefactory.Visitors @@ -78,17 +78,32 @@ namespace ICSharpCode.NRefactory.Visitors
variables.Clear();
parameters.Clear();
}
string GetDotNetNameFromTypeReference(TypeReference type)
{
string name;
InnerClassTypeReference ictr = type as InnerClassTypeReference;
if (ictr != null) {
name = GetDotNetNameFromTypeReference(ictr.BaseType) + "+" + ictr.Type;
} else {
name = type.Type;
}
if (type.GenericTypes.Count != 0)
name = name + "`" + type.GenericTypes.Count.ToString();
return name;
}
CodeTypeReference ConvType(TypeReference type)
{
if (type == null) {
throw new ArgumentNullException("type");
}
if (string.IsNullOrEmpty(type.Type)) {
throw new InvalidOperationException("empty type");
}
CodeTypeReference t = new CodeTypeReference(type.Type);
CodeTypeReference t = new CodeTypeReference(GetDotNetNameFromTypeReference(type));
InnerClassTypeReference ictr = type as InnerClassTypeReference;
if (ictr != null) {
type = ictr.CombineToNormalTypeReference();
}
foreach (TypeReference gt in type.GenericTypes) {
t.TypeArguments.Add(ConvType(gt));
}

4
src/Libraries/NRefactory/Test/NRefactoryTests.csproj

@ -47,6 +47,9 @@ @@ -47,6 +47,9 @@
<HintPath>..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@ -54,6 +57,7 @@ @@ -54,6 +57,7 @@
<Compile Include="General\UnitTest.cs" />
<Compile Include="Lexer\CSharp\PreprocessingTests.cs" />
<Compile Include="Lexer\VBNet\CustomLexerTests.cs" />
<Compile Include="Output\CodeDOM\CodeDOMTypeReferenceTest.cs" />
<Compile Include="Parser\CheckParentVisitor.cs" />
<Compile Include="Parser\Expressions\AddressOfExpressionTests.cs" />
<Compile Include="Parser\Expressions\LambdaExpressionTests.cs" />

10
src/Libraries/NRefactory/Test/NRefactoryTests.csproj.user

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>8.0.50215</LastOpenVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>D:\Corsavy\SharpDevelop\bin\SharpDevelop.exe</StartProgram>
<StartArguments>D:\Corsavy\SharpDevelop\src\Libraries\NRefactory\NRefactory.sln</StartArguments>
</PropertyGroup>
</Project>

33
src/Libraries/NRefactory/Test/Output/CodeDOM/CodeDOMTypeReferenceTest.cs

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.CodeDom;
using ICSharpCode.NRefactory.Ast;
using ICSharpCode.NRefactory.Visitors;
using NUnit.Framework;
namespace ICSharpCode.NRefactory.Tests.Output.CodeDOM.Tests
{
[TestFixture]
public class CodeDOMTypeReferenceTest
{
[TestAttribute]
public void InnerClassTypeReferencTest()
{
InnerClassTypeReference ictr = new InnerClassTypeReference(
new TypeReference("OuterClass", new List<TypeReference> { new TypeReference("String") }),
"InnerClass",
new List<TypeReference> { new TypeReference("Int32"), new TypeReference("Int64") });
Assert.AreEqual("OuterClass<String>+InnerClass<Int32,Int64>", ictr.ToString());
CodeTypeOfExpression result = (CodeTypeOfExpression)new TypeOfExpression(ictr).AcceptVisitor(new CodeDomVisitor(), null);
Assert.AreEqual("OuterClass`1+InnerClass`2", result.Type.BaseType);
Assert.AreEqual(3, result.Type.TypeArguments.Count);
}
}
}

15
src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs

@ -467,5 +467,20 @@ End Using"); @@ -467,5 +467,20 @@ End Using");
TestExpression("347UL");
TestExpression("\".\"C");
}
[Test]
public void AddressOf()
{
TestExpression("AddressOf Abc");
}
[Test]
public void ObjectInitializer()
{
TestExpression("New StringWriter() With { _\n" +
" .NewLine = Environment.NewLine, _\n" +
" .Encoding = Encoding.UTF8 _\n" +
"}");
}
}
}

5
src/Main/Base/Project/Src/Commands/CustomStringTagProvider.cs

@ -80,6 +80,11 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -80,6 +80,11 @@ namespace ICSharpCode.SharpDevelop.Commands
return Path.GetExtension(GetCurrentItemPath()) ?? string.Empty;
} catch (Exception) {}
return string.Empty;
case "ITEMNAMENOEXT":
try {
return Path.GetFileNameWithoutExtension(GetCurrentItemPath()) ?? string.Empty;
} catch (Exception) {}
return string.Empty;
case "CURLINE":
{

8
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/CSharpToVBNetConvertVisitor.cs

@ -467,6 +467,14 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -467,6 +467,14 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
// casts from float to int in C# truncate, but VB rounds
// we'll have to introduce a call to Math.Truncate
castExpression.Expression = ExpressionBuilder.Identifier("Math").Call("Truncate", castExpression.Expression);
} else if (sourceType != null && sourceType.FullyQualifiedName == "System.Char") {
// casts from char to int are valid in C#, but need to use AscW in VB
castExpression.Expression = ExpressionBuilder.Identifier("AscW").Call(castExpression.Expression);
if (targetType != null && targetType.FullyQualifiedName == "System.Int32") {
// AscW already returns int, so skip the cast
ReplaceCurrentNode(castExpression.Expression);
return null;
}
}
}
}

35
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/CodeSnippetConverter.cs

@ -39,6 +39,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -39,6 +39,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
List<ISpecial> specials;
CompilationUnit compilationUnit;
ParseInformation parseInfo;
bool wasExpression;
#region Parsing
INode Parse(SupportedLanguage sourceLanguage, string sourceCode, out string error)
@ -56,18 +57,20 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -56,18 +57,20 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
if (parser.Errors.Count != 0)
return null;
wasExpression = parser.SnippetType == SnippetType.Expression;
if (wasExpression) {
// Special case 'Expression': expressions may be replaced with other statements in the AST by the ConvertVisitor,
// but we need to return a 'stable' node so that the correct transformed AST is returned.
// Thus, we wrap any expressions into a statement block.
result = MakeBlockFromExpression((Expression)result);
}
// now create a dummy compilation unit around the snippet result
switch (parser.SnippetType) {
case SnippetType.CompilationUnit:
compilationUnit = (CompilationUnit)result;
break;
case SnippetType.Expression:
compilationUnit = MakeCompilationUnitFromTypeMembers(
MakeMethodFromBlock(
MakeBlockFromExpression(
(Expression)result
)));
break;
case SnippetType.Statements:
compilationUnit = MakeCompilationUnitFromTypeMembers(
MakeMethodFromBlock(
@ -95,6 +98,22 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -95,6 +98,22 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
return result;
}
/// <summary>
/// Unpacks the expression from a statement block; if it was wrapped earlier.
/// </summary>
INode UnpackExpression(INode node)
{
if (wasExpression) {
BlockStatement block = node as BlockStatement;
if (block != null && block.Children.Count == 1) {
ExpressionStatement es = block.Children[0] as ExpressionStatement;
if (es != null)
return es.Expression;
}
}
return node;
}
BlockStatement MakeBlockFromExpression(Expression expr)
{
return new BlockStatement {
@ -146,7 +165,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -146,7 +165,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
},
null);
PreprocessingDirective.CSharpToVB(specials);
return CreateCode(node, new VBNetOutputVisitor());
return CreateCode(UnpackExpression(node), new VBNetOutputVisitor());
}
public string VBToCSharp(string input, out string errors)
@ -159,7 +178,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -159,7 +178,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
new VBNetToCSharpConvertVisitor(project, parseInfo),
null);
PreprocessingDirective.VBToCSharp(specials);
return CreateCode(node, new CSharpOutputVisitor());
return CreateCode(UnpackExpression(node), new CSharpOutputVisitor());
}
string CreateCode(INode node, IOutputAstVisitor outputVisitor)

77
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/CodeGenerator.cs

@ -43,26 +43,70 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -43,26 +43,70 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
if (returnType == null) return TypeReference.Null;
if (returnType is NullReturnType) return TypeReference.Null;
TypeReference typeRef;
if (IsPrimitiveType(returnType))
typeRef = new TypeReference(returnType.FullyQualifiedName, true);
else if (context != null && CanUseShortTypeName(returnType, context))
typeRef = new TypeReference(returnType.Name);
else
typeRef = new TypeReference(returnType.FullyQualifiedName);
while (returnType.IsArrayReturnType) {
ArrayReturnType arrayReturnType = returnType.CastToArrayReturnType();
if (arrayReturnType != null) {
TypeReference typeRef = ConvertType(arrayReturnType.ArrayElementType, context);
int[] rank = typeRef.RankSpecifier ?? new int[0];
Array.Resize(ref rank, rank.Length + 1);
rank[rank.Length - 1] = returnType.CastToArrayReturnType().ArrayDimensions - 1;
rank[rank.Length - 1] = arrayReturnType.ArrayDimensions - 1;
typeRef.RankSpecifier = rank;
returnType = returnType.CastToArrayReturnType().ArrayElementType;
return typeRef;
}
PointerReturnType pointerReturnType = returnType.CastToDecoratingReturnType<PointerReturnType>();
if (pointerReturnType != null) {
TypeReference typeRef = ConvertType(pointerReturnType.BaseType, context);
typeRef.PointerNestingLevel++;
return typeRef;
}
IList<IReturnType> typeArguments = EmptyList<IReturnType>.Instance;
if (returnType.IsConstructedReturnType) {
foreach (IReturnType typeArgument in returnType.CastToConstructedReturnType().TypeArguments) {
typeArguments = returnType.CastToConstructedReturnType().TypeArguments;
}
IClass c = returnType.GetUnderlyingClass();
if (c != null) {
return CreateTypeReference(c, typeArguments, context);
} else {
TypeReference typeRef;
if (IsPrimitiveType(returnType))
typeRef = new TypeReference(returnType.FullyQualifiedName, true);
else if (context != null && CanUseShortTypeName(returnType, context))
typeRef = new TypeReference(returnType.Name);
else {
string fullName = returnType.FullyQualifiedName;
if (string.IsNullOrEmpty(fullName))
fullName = returnType.Name;
typeRef = new TypeReference(fullName);
}
foreach (IReturnType typeArgument in typeArguments) {
typeRef.GenericTypes.Add(ConvertType(typeArgument, context));
}
return typeRef;
}
}
static TypeReference CreateTypeReference(IClass c, IList<IReturnType> typeArguments, ClassFinder context)
{
if (c.DeclaringType != null) {
TypeReference outerClass = CreateTypeReference(c.DeclaringType, typeArguments, context);
List<TypeReference> args = new List<TypeReference>();
for (int i = c.DeclaringType.TypeParameters.Count; i < Math.Min(c.TypeParameters.Count, typeArguments.Count); i++) {
args.Add(ConvertType(typeArguments[i], context));
}
return new InnerClassTypeReference(outerClass, c.Name, args);
} else {
TypeReference typeRef;
if (IsPrimitiveType(c.DefaultReturnType))
typeRef = new TypeReference(c.FullyQualifiedName, true);
else if (context != null && CanUseShortTypeName(c.DefaultReturnType, context))
typeRef = new TypeReference(c.Name);
else
typeRef = new TypeReference(c.FullyQualifiedName);
for (int i = 0; i < Math.Min(c.TypeParameters.Count, typeArguments.Count); i++) {
typeRef.GenericTypes.Add(ConvertType(typeArguments[i], context));
}
return typeRef;
}
return typeRef;
}
static bool IsPrimitiveType(IReturnType returnType)
@ -78,9 +122,12 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -78,9 +122,12 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
/// </summary>
public static bool CanUseShortTypeName(IReturnType returnType, ClassFinder context)
{
int typeArgumentCount = (returnType.IsConstructedReturnType) ? returnType.CastToConstructedReturnType().TypeArguments.Count : 0;
IReturnType typeInTargetContext = context.SearchType(returnType.Name, typeArgumentCount);
return typeInTargetContext != null && typeInTargetContext.FullyQualifiedName == returnType.FullyQualifiedName;
if (returnType == null || context == null)
return false;
IReturnType typeInTargetContext = context.SearchType(returnType.Name, returnType.TypeArgumentCount);
return typeInTargetContext != null
&& typeInTargetContext.FullyQualifiedName == returnType.FullyQualifiedName
&& typeInTargetContext.TypeArgumentCount == returnType.TypeArgumentCount;
}
public static Modifiers ConvertModifier(ModifierEnum modifiers, ClassFinder targetContext)

24
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs

@ -103,6 +103,30 @@ namespace ICSharpCode.SharpDevelop.Dom.Tests @@ -103,6 +103,30 @@ namespace ICSharpCode.SharpDevelop.Dom.Tests
Assert.AreEqual("CInt(-35L)", converter.CSharpToVB("(int)(-35L)", out errors));
}
[Test]
public void ConvertCharToInteger()
{
Assert.AreEqual("AscW(\"x\"C)", converter.CSharpToVB("(int)'x'", out errors));
}
[Test]
public void ConvertCharToByte()
{
Assert.AreEqual("CByte(AscW(\"x\"C))", converter.CSharpToVB("(byte)'x'", out errors));
}
[Test]
public void ConvertIntegerToChar()
{
Assert.AreEqual("ChrW(65)", converter.CSharpToVB("(char)65", out errors));
}
[Test]
public void ConvertByteToChar()
{
Assert.AreEqual("ChrW(CByte(65))", converter.CSharpToVB("(char)(byte)65", out errors));
}
string Normalize(string text)
{
return text.Replace("\t", " ").Replace("\r", "").Trim();

1
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ICSharpCode.SharpDevelop.Dom.Tests.csproj

@ -50,6 +50,7 @@ @@ -50,6 +50,7 @@
<Compile Include="ClassInheritanceTreeTests.cs" />
<Compile Include="CodeSnippetConverterTests.cs" />
<Compile Include="CSharpAmbienceTests.cs" />
<Compile Include="ImplementInterfaceTests.cs" />
<Compile Include="NRefactoryAstConverterTests.cs" />
<Compile Include="NRefactoryRefactoringProviderTests.cs" />
<Compile Include="NUnitHelpers\SyntaxHelpers.cs" />

59
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ImplementInterfaceTests.cs

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.Ast;
using ICSharpCode.NRefactory.PrettyPrinter;
using ICSharpCode.SharpDevelop.Dom.Refactoring;
using NUnit.Framework;
namespace ICSharpCode.SharpDevelop.Dom.Tests
{
[TestFixture]
public class ImplementInterfaceTests
{
[Test]
public void NestedInterfaceInGenericClass()
{
// See SD2-1626
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(SharedProjectContentRegistryForTests.Instance.Mscorlib);
DefaultCompilationUnit cu = new DefaultCompilationUnit(pc);
DefaultClass container = new DefaultClass(cu, "TestClass");
container.TypeParameters.Add(new DefaultTypeParameter(container, "T", 0));
DefaultClass innerClass = new DefaultClass(cu, container);
innerClass.FullyQualifiedName = "TestClass.INestedInterface";
innerClass.ClassType = ClassType.Interface;
innerClass.TypeParameters.Add(new DefaultTypeParameter(innerClass, "T", 0));
innerClass.Properties.Add(new DefaultProperty(innerClass, "P") {
ReturnType = new GenericReturnType(innerClass.TypeParameters[0]),
CanGet = true
});
container.InnerClasses.Add(innerClass);
pc.AddClassToNamespaceList(container);
DefaultClass targetClass = new DefaultClass(cu, "TargetClass");
List<AbstractNode> nodes = new List<AbstractNode>();
IReturnType interf = new SearchClassReturnType(pc, targetClass, 0, 0, "TestClass.INestedInterface", 1);
interf = new ConstructedReturnType(interf, new IReturnType[] { SharedProjectContentRegistryForTests.Instance.Mscorlib.GetClass("System.String", 0).DefaultReturnType });
CSharpCodeGenerator codeGen = new CSharpCodeGenerator();
codeGen.ImplementInterface(nodes, interf, true, targetClass);
Assert.AreEqual(1, nodes.Count);
CSharpOutputVisitor output = new CSharpOutputVisitor();
output.Options.IndentationChar = ' ';
output.Options.IndentSize = 2;
nodes[0].AcceptVisitor(output, null);
Assert.AreEqual("string TestClass<string>.INestedInterface.P {\n get {\n throw new NotImplementedException();\n }\n}", output.Text.Replace("\r", "").Trim());
}
}
}

24
src/Setup/Files.wxs

@ -1174,10 +1174,14 @@ @@ -1174,10 +1174,14 @@
-->
<Directory Id="PythonBinding" Name="PythonBinding">
<Component Guid="AF97A77A-F986-4284-BC0A-9568B1419FC1" Id="IpyExe" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\ipy.exe" Name="ipy.exe" Id="ipy.exe" KeyPath="yes" Assembly=".net" AssemblyApplication="ipy.exe" AssemblyManifest="ipy.exe" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\ipy.exe" Name="ipy.exe" Id="ipy.exe" KeyPath="yes" Assembly=".net" AssemblyApplication="ipy.exe" AssemblyManifest="ipy.exe">
<netfx:NativeImage Id="IpyExeNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
<Component Guid="A7C0416F-8B3F-4C64-A25C-8B48AADD957D" Id="IronPythonDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\IronPython.dll" Id="IronPython.dll" Name="IronPython.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronPython.dll" AssemblyManifest="IronPython.dll" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\IronPython.dll" Id="IronPython.dll" Name="IronPython.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronPython.dll" AssemblyManifest="IronPython.dll">
<netfx:NativeImage Id="IronPythonDllNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
<Component Guid="ADBB3544-DE83-4676-A95E-3BC497ABC94D" Id="PythonBuildTasksDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Python.Build.Tasks.dll" Id="Python.Build.Tasks.dll" Name="Python.Build.Tasks.dll" Assembly=".net" AssemblyApplication="Python.Build.Tasks.dll" AssemblyManifest="Python.Build.Tasks.dll" KeyPath="yes" />
@ -1215,10 +1219,14 @@ @@ -1215,10 +1219,14 @@
</Component>
</Directory>
<Component Guid="DE04B306-0C6D-434C-A6DC-6F450AAFB108" Id="IronPythonModulesDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\IronPython.Modules.dll" Name="IronPython.Modules.dll" Id="IronPython.Modules.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronPython.Modules.dll" AssemblyManifest="IronPython.Modules.dll" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\IronPython.Modules.dll" Name="IronPython.Modules.dll" Id="IronPython.Modules.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronPython.Modules.dll" AssemblyManifest="IronPython.Modules.dll">
<netfx:NativeImage Id="IronPythonModulesDllNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
<Component Guid="5849E9E1-39E4-45B5-B2F0-B07F8A21085D" Id="MicrosoftScriptingDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Scripting.dll" Name="Microsoft.Scripting.dll" Id="Microsoft.Scripting.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Scripting.dll" AssemblyManifest="Microsoft.Scripting.dll" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Scripting.dll" Name="Microsoft.Scripting.dll" Id="Microsoft.Scripting.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Scripting.dll" AssemblyManifest="Microsoft.Scripting.dll">
<netfx:NativeImage Id="MicrosoftScriptingDllNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
<Directory Id="PythonLib" Name="Lib">
<Component Guid="98D4136A-897A-479A-AD50-E89600C5016D" Id="PythonBindingLibRunpyPy" DiskId="1">
@ -1238,10 +1246,14 @@ @@ -1238,10 +1246,14 @@
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\IronPython.xml" Name="IronPython.xml" Id="IronPython.xml" KeyPath="yes" />
</Component>
<Component Guid="6E1D93BF-A105-4526-8BA0-13B69EEB1360" Id="MicrosoftDynamicDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Dynamic.dll" Name="Microsoft.Dynamic.dll" Id="Microsoft.Dynamic.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Dynamic.dll" AssemblyManifest="Microsoft.Dynamic.dll" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Dynamic.dll" Name="Microsoft.Dynamic.dll" Id="Microsoft.Dynamic.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Dynamic.dll" AssemblyManifest="Microsoft.Dynamic.dll">
<netfx:NativeImage Id="MicrosoftDynamicDllNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
<Component Guid="8A1A4691-E6BD-451F-AA5D-BE9C716D56A0" Id="MicrosoftScriptingDebuggingDll" DiskId="1">
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Scripting.Debugging.dll" Name="Microsoft.Scripting.Debugging.dll" Id="Microsoft.Scripting.Debugging.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Scripting.Debugging.dll" AssemblyManifest="Microsoft.Scripting.Debugging.dll" />
<File Source="..\..\AddIns\AddIns\BackendBindings\PythonBinding\Microsoft.Scripting.Debugging.dll" Name="Microsoft.Scripting.Debugging.dll" Id="Microsoft.Scripting.Debugging.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="Microsoft.Scripting.Debugging.dll" AssemblyManifest="Microsoft.Scripting.Debugging.dll">
<netfx:NativeImage Id="MicrosoftScriptingDebuggingDllNGenImage" Priority="1" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" />
</File>
</Component>
</Directory>
<!--<Directory Id="FSharpBinding" Name="FSharpBinding">

BIN
src/Tools/NUnit/lib/nunit-console-runner.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit-gui-runner.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.core.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.core.interfaces.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.fixtures.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.uiexception.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.uikit.dll

Binary file not shown.

BIN
src/Tools/NUnit/lib/nunit.util.dll

Binary file not shown.

BIN
src/Tools/NUnit/nunit-console-dotnet2-x86.exe

Binary file not shown.

BIN
src/Tools/NUnit/nunit-console-dotnet2.exe

Binary file not shown.

BIN
src/Tools/NUnit/nunit-console-x86.exe

Binary file not shown.

BIN
src/Tools/NUnit/nunit-console.exe

Binary file not shown.

4
src/Tools/NUnit/nunit-console/AssemblyInfo.cs

@ -36,5 +36,5 @@ using System.Reflection; @@ -36,5 +36,5 @@ using System.Reflection;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.5.2")]
[assembly: AssemblyInformationalVersion("2.5.2")]
[assembly: AssemblyVersion("2.5.3")]
[assembly: AssemblyInformationalVersion("2.5.3")]

11
src/Tools/NUnit/nunit-console/ExtendedRunner.cs

@ -70,7 +70,16 @@ namespace NUnit.ConsoleRunner @@ -70,7 +70,16 @@ namespace NUnit.ConsoleRunner
// Initialize Services
ServiceManager.Services.InitializeServices();
foreach (string parm in options.Parameters)
{
if (!Services.ProjectService.CanLoadProject(parm) && !PathUtils.IsAssemblyFileType(parm))
{
Console.WriteLine("File type not known: {0}", parm);
return ConsoleUi.INVALID_ARG;
}
}
try
{
ExtendedConsoleUi consoleUi = new ExtendedConsoleUi();

BIN
src/Tools/NUnit/nunit.framework.dll

Binary file not shown.
Loading…
Cancel
Save